1
vote
0answers
29 views

Linux: Warn Python Script of Restart

I have a Raspberry Pi which uses a USB wireless adapter and wicd-curses. A Python script runs in the background which uses a WebSocket. When I call sudo reboot, my Python script gets the signal to ...
0
votes
2answers
16 views

pypokereval library configure script fails with “No python development environments found”

I'm trying to compile the pypoker-eval-138.0 library for python2.7 (default on mint linux): source tarball dir GNA pokersource site So when running the configure script via ./configure, I get ...
0
votes
4answers
24 views

How do I get input from linux command line into my Python script?

I am trying to execute a command on a file such as chmod in a python script. How can I get the file name from command line to the script? I want to execute the script like so ./addExecute.py blah ...
2
votes
2answers
32 views

How to kill a process been created by subprocess in python?

Under Linux Ubuntu operating system, I run the test.py scrip which contain a GObject loop using subprocess by: subprocess.call(["test.py"]) Now, this test.py will creat process. Is there a way to ...
2
votes
4answers
52 views

Mass transfer files using scp

I'm trying to transfer large quantities of data from one server to another. I've tried using scp <file> <address@server:/path/to/scp/to Which works, however it's quite slow for large ...
0
votes
0answers
37 views

Why does Python follow symlinks? How do I work around that?

This is my directory layout: projects/ +-projectA/ |---moduleA.py |---script.py -> ../projectB/script.py +-projectB/ |---script.py This is what script.py contains: import ...
0
votes
0answers
8 views

Python Daemon Thread Clean Up Logic on Abrupt sys.exit()

Using Linux and Python 2.7.6, I have a script that uploads lots of files at one time. I am using multi-threading with the Queue and Threading modules. I implemented a handler for SIGINT to stop the ...
0
votes
0answers
11 views

Error installing psycopg2 in Ubuntu 12.04

I'm having some trouble installing psycopg2 into a virtualenv. Here is the output for pip install psycopg2. Note 1: I checked a lot of StackOverflow answers and i installed all that *-dev packages ...
0
votes
1answer
15 views

fnmatch does not work with variables but with static strings

The following code does not find any of the patterns defined in the file patterns. #!/usr/bin/env python import os import fnmatch patternFile = open('patterns', 'r') patterns = ...
0
votes
1answer
17 views

Sending data to serial with pyserial - Work on Razor 9DOF IMU

I'm currently workng on a IMU Razor 9DOF I can read data from it by reading /dev/ttyUSB0. (default mode is YPR = angles of the IMU) I can also change the data i'm receiving by sending #ot or #osrt to ...
0
votes
1answer
15 views

using ConfigParser to delete lines in config file with no sections

I am trying to change a .conf file on a Linux server, but there are no sections in the .conf file. I want to search in a key/value pair for a specific keyword and then delete a couple of lines above ...
1
vote
0answers
21 views

python subprocess.pyc “no such file or directory”

I have a Python script and I have a mistake about subprocess. My algorithm: import re from subprocess import call import pylab thickness = [0.005,0.006,0.007,0.008,0.009,0.01,0.011,0.012] Fn1 = [] ...
0
votes
1answer
32 views

Parse a variable row in python

Coming from this link: Splitlines in Python a table with empty spaces It works good but there is a problem when the size of the columns change: COMMAND PID USER FD TYPE DEVICE ...
1
vote
0answers
29 views

Log user detail who restarted a service [on hold]

This is related to a question asked by me some time back. I want to log the details regarding who restarted a particular service on Linux. For example: If a user X restarts apache, then it would ...
0
votes
3answers
34 views

apt-get install unable to locate package [on hold]

On a virtual machine (OS is Ubuntu 10.10), I'm trying to create Debian package from a Python package using stdeb: apt-get install python-stdeb But the terminal says: E:Unable to locate package ...
0
votes
0answers
60 views

Python search path wrong, but only in Windows

I am creating a larger logical package spread out over many directories, like so: [projects root]/projectname1/lib/python/logicalpackage/__init__.py [projects ...
0
votes
1answer
27 views

How I open remote server folder using python?

How to Open the remote server folder > inside the folder only images store we read all the images. Server is Linux server import paramiko import sys import os ssh = paramiko.SSHClient() ...
0
votes
0answers
14 views

Setting Up a Python Cron Job [migrated]

I hope you guys can help. I've never set up a cron job before but would like to run a daily Python script at 5am on my server. I'm using hosting from CrazyDomains.com.au (Linux server) and can't find ...
-2
votes
0answers
15 views

Opensource script to monitor proxy ip with http status code result [on hold]

I want to create a script which monitor http request status code for particular ips. For eg i have purchased a list of proxy ip through which, I do curl to number of sites with random ip, So i just ...
0
votes
0answers
29 views

Nohup stopped running python script after two days on EC2

Here is my story: I wanted to collect twitter data continuously using Twitter Streaming API, so I wrote a python script to save the tweets into text files hourly, put it on my free tier EC2 instance ...
0
votes
0answers
32 views

I am trying install xively-python but my results show a netrc error

I am having trouble installing xively-python on my BeagleBone Black. I am currently running Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) ...
1
vote
1answer
35 views

Splitlines in Python a table with empty spaces

Through one command linux (lsof) I get a serie of data in a table: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd unknown ...
0
votes
1answer
59 views

could not convert string to data - python

I have a python script and it makes file from .dat to .csv. However, I have mistake about this script. My code: import os import sys import math _NAME = os.path.split(sys.argv[0])[1] #who am i? ...
0
votes
1answer
18 views

wxpython balloonframe overlays all windows

I am using BalloonTip and BalloonFrame from wxpython in order to generate pop up notifications. Unfortunately the generated elements are overlapping all windows: Not only the window of my application ...
0
votes
1answer
27 views

How to send email alert to admin after delete a python setup file using linux?

I want to send an email alert using the linux os when user delete python setup file. i made a screenshot program using python, unfortunately if user uninstall python setup file.I want to send an email ...
0
votes
1answer
27 views

matplotlib - installing on CentOS - setup.py build fails

trying to install matplotlib (1.1.0 with python 2.7.3 on CentOS) python setup.py build looks good until: running build_ext building 'matplotlib.ft2font' extension gcc -pthread -fno-strict-aliasing ...
0
votes
1answer
39 views

Directing cmp output to a file using python

I am trying something like this, but I am not sure why its not working. for files in os.listdir("."): if files.endswith(".o"): str = "cmp "+ str1+" "+str2 +" > s.txt " ...
7
votes
3answers
92 views

Python not closing file descriptors

I am developing a long-running python script which makes many connections to different serial ports. The script crashes a few hours into its execution citing "Too many open files". I have tracked ...
0
votes
3answers
40 views

How to determine pid of process started via os.system

I want to start several subprocesses with a programm, i.e. a module foo.py starts several instances of bar.py. This is extremely time-sensitive, therefor the subprocess Popen(["python", "bar.py", ...
1
vote
1answer
47 views

Python Authlog Log File analysis

I recently started to play around with Python 3 which I enjoy a lot. I'm a sysadmin in apprenticeship so I have nearly no programming experience. I want to make a small program which is going to tell ...
1
vote
0answers
28 views

Matrix with subscripts in matplotlib python

http://en.wikipedia.org/wiki/File:Matrix.svg Is there a way to plot that image in python using matplotlib? I atleast would like it to have the variable with subscripts in the plot. I could not see ...
0
votes
3answers
25 views

“script command” and logging in python

I have a python app that has lots of outputs on the screen which can be used for debugging. out of all the logging techniques, "script" command works well for me because I can see the output on the ...
0
votes
1answer
33 views

DHCP request library

Currently, I am using "subprocess" command with "dhclient" so I can make DHCP request from server. I am trying to improve that and just use a pure python library to make DHCP client request. Any one ...
-1
votes
1answer
38 views

Python - how to get the import pjsua? giving no module named pjsua

How to get python pjsua? $ wget http://www.pjsip.org/release/2.1/pjproject-2.1.tar.bz2 $ tar xvfj pjproject-2.1.tar.bz2 $ cd pjproject-2.1.0 $ ./configure $ make dep && make $ make install $ ...
1
vote
1answer
48 views

Python os.access error for files mounted with sshfs on Linux

I have the following set-up: I have a disk mounted with sshfs and I am trying to access the files on it from a python script run locally on my machine. The problem is that even though my user doesn't ...
-2
votes
2answers
47 views

Script to create line chart based on dates

I have a text file with 2 lines: 4 5 6 7 8 12/03/2012 13/03/2012 14/03/2012 15/03/2012 16/03/2012 and I want to create line chart like this: Currently I have this script: ...
0
votes
1answer
30 views

WXPython interface when moving from Windows to Linux is not working properly

I almost finished a trial version of my graphic interface. I did that on Windows and then I move to Linux to test it. The problem I am having is that the Matplotlib panel is being cut (just on Linux ...
0
votes
1answer
38 views

How to detect resizeable window state in pygame and de-maximize it in Linux?

I have an application built in python with use of pygame that initially displays a login screen at a set size which is not RESIZABLE and then when user logs into the game the saved settings are being ...
0
votes
4answers
43 views

print or write to file “\040”(space) in python

Background: I need to write following line to fstab file using python //10.1.1.1//First\040Second /Mount cifs ------ Problem : But this First Second is coming from input and when I try to ...
-2
votes
3answers
67 views

How to solve “requires python 2.x support” in linux vim,and it have python 2.6.6 in my system

[root@localhost bin]# python -V Python 2.6.6 [root@localhost bin]# ./vim UltiSnips requires py >= 2.6 or any py3 YouCompleteMe unavailable: requires Vim compiled with Python 2.x support i have ...
1
vote
1answer
39 views

python - code works fine on Linux but crashes on OSX

I'm running on OSX Mavericks and have python 3.3.3 installed. Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin) I'm trying to run this ...
0
votes
1answer
82 views

Installing OpenCV on Raspberry Pi: can't find packages

I'm trying to install OpenCV 2.4.7 on Raspberry Pi (Model B, OS: Raspbian). The guides I'm referring to are: 1. RASPBERRY PI + SIMPLECV + OPENCV + RASPICAM CSI CAMERA 2. Raspberry Pi + OpenCV 3. ...
-3
votes
4answers
57 views

bach linux file rename - how to rename multiple files in linux console

I would like to rename cca 1000 files that are named like: 66-123123.jpg -> abc-123123-66.jpg. So in general file format is: xx-yyyyyy.jpg -> abc-yyyyyy-xx.jpg, where xx and yyyyyy are numbers, abc is ...
0
votes
1answer
15 views

how to change the apt-cache version for python-setuptools on ubuntu?

Running: sudo apt-get install python-setuptools on Ubuntu generates an error which looks like the apt cache is telling apt-get to try to read an old version that no longer exists on the remote ...
2
votes
2answers
38 views

Webscraping from directory of HTML files using BS4 and python

I have a website in which each person's details are stored in separate .HTML file. So there are totally 100 person whose details are stored in 100 different .html files. But all have same HTML ...
0
votes
1answer
37 views

What does platform.system and platform.linux_distribution exactly output?

I am trying to create a python script to install and configure certain program automatically in linux machines. My idea is to use the platform and multiprocessing libraries to ask for system ...
1
vote
1answer
55 views

“No such file” error when using paramiko's sftp

I want to file transfer local to server using python #!/usr/bin/env python import os import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ...
0
votes
1answer
52 views

Calling exe in Windows from Linux

Background knowledge: Website in Django run under apache. Briefly speaking, I need to call an .exe program in a windows machine from a Linux machine. The reason for this is our website runs on ...
1
vote
2answers
40 views

Transform text in python

I have data in the following format: This is line1 <line 1>. This is line2 <http://<line2> . This is line3 <http://<>line3>. This is line4 <line4> . I ...
0
votes
1answer
32 views

OpenCV VideoCapture::set() returns false but succeeds

I'm using OpenCV 2.4.6 with both C++ and Python on Kubuntu 12.04. With a Logitech Quick Cam Pro 3000 webcam, I succeed to set the frame size but VideoCapture::set() always returns false. // C++ ...

15 30 50 per page