Tagged Questions
0
votes
1answer
25 views
Python : rcvfrom() doesn't work in Linux
The below mentioned part of the UDP client program works fine with windows and looks like rcvfrom() function is stuck in linux. Using tcpdump i can see the packets arriving on the interface. I've ...
0
votes
0answers
16 views
How to install python abi 2.6?
My Redhat OS has install python2.4 before,and now ,I install python 2.6, when I use yum to install mysql-utilities-1.3.4-1.el6.noarch, it said it need python(abi) 2.6.
I enter rpm -q --provides python ...
2
votes
2answers
44 views
Is it possible to display the commands being executed when running a .sh script in the terminal [duplicate]
I have an executable bash file with commands.
It appears these files do not show what is being executed as the lines get executed by the terminal.
Is there a way to show the lines that are being ...
0
votes
0answers
41 views
Python - how can i only print plain texts? Not the whole Http headers while executing the script from command line?
How can i only get the output from my py.py as [invalid]: new not all the http headers?
Expecting: [invalid]: new
$ export DISPLAY=:0.0 && curl ...
0
votes
0answers
21 views
Linux file system events and python's shutil
In Java 7 I can use to file system events like file creation, modification, etc. However, when I move a file using Python's shutil module, my program doesn't receive the event.
Does anyone knows why ...
0
votes
2answers
72 views
permutation with two sets in itertools using python
I having trouble in rewriting length python code in much more pythonic way.
Here is what I have tried, it also contains an example how I want my final code to look like
#!/usr/bin/env python
import ...
0
votes
1answer
45 views
@reboot cronjob not executing
I have a Python script which simply writes some text and saves it to a file
#! /usr/bin/python3
def main():
filename = '/home/user/testHello.txt'
openfile = open(filename,"w")
...
0
votes
4answers
38 views
How to convert backward slash command in python to run on Linux
I get error on this line when I run code in Linux:
dst_file_path = "%s\%s" % (dst,loc[1])
How can do this using some module. Thanks in advance. ...
0
votes
0answers
7 views
SimpleCV and Python not encoding video file? or bad coding
i have been trying to get video working within SimpleCV using Python for some time now.
I have tried this Example from this site. it records and saves to a file. but the video doesnt having anything ...
0
votes
1answer
34 views
python embedded in C++ using ncurses initialized by C++ throws error
I have a python script embedded in a C++ app on Linux. The C++ app uses ncurses and does the screen initialization and all of the writing to the screen.
I was asked to make a setup wizard and ...
1
vote
1answer
22 views
Scrapy importing XML feed of 100mb - Memory Error
I am using scrapy to scrape a 100mb XML feed on an Amazon EC2 instance. I am stuck however because when it runs it talks about a memory error. The coder I am working with suggests breaking the 100mb ...
3
votes
2answers
56 views
Viewing the last lines of a log file [on hold]
What is the best method to visually see the last 10 lines of the Apache error log? Currently what I do is:
gedit /var/log/httpd/error_log
but this means having to click on the new Gedit window that ...
0
votes
1answer
31 views
Installing pip: python-pip? or from python-setuptools [on hold]
I first use python in windows and now moved to Ubuntu. What's the difference between these two ways of installing pip?
I tried to install python-pip but was surprised to see the 30mb size while ...
0
votes
1answer
35 views
Cron not running Python script is script not in home folder
I know cron is capricious and I am trying to figure out how to deal with it on linux.
I have the following test_cron.py executable Python script for testing cron :
#!/usr/bin/env python
import os
...
-1
votes
2answers
32 views
Python with etc/Shadow
so I'm writing this program that needs to check the password hash in etc/shadow and compare it to the password the user entered. I tried encrypting the password with hashlib.sha512, but the result was ...