Tagged Questions
0
votes
0answers
11 views
How to change process state from sleep to running in linux?
I have a python program which needs to scan some large log files to extract useful information.
In this program, to better utilize computing resource of sever (which runs ubuntu 12.04 LTS and has 64 ...
-1
votes
0answers
8 views
Forwarding externally generated custom Ethernet frame to Linux TAP device
I have a Linux box (Ubuntu 12.04) with multiple TAP interfaces bridged (using bridge-utils) together and also bridged with physical interface (eth0), STP is disabled.
I am willing to send externally ...
0
votes
1answer
37 views
How do I make a C wrapper (written in 32 bit Python) work on a new machine that runs 64 bit Python?
I wrote a C wrapper using the Python C API on our development machine (which is 32 bit and runs 32 bit Python 2.7). I have since had to move the wrapper and C source code to another machine which is ...
1
vote
1answer
37 views
How to use python to scrape the text from a page generated by javascript?
I'm looking for a way on Linux to write a script that scrapes the text from a page which is generated by Javascript (specifically etherpad e.g. http://www.board.net). Ideally I'd like to use an ...
0
votes
3answers
39 views
Python with subprocess
I am trying to learn Python, using Python 2.6. This is my first script:
#!usr/bin/python
import subprocess
command = subprocess.Popen(['date'])
print command.communicate()
It works and prints the ...
0
votes
1answer
18 views
Get data transfered in Python Modules
I am using Pyhton 3.4 on a Linux PC. I have written a program to access ftp page using ftplib module and download a file from it on my pc.
I want to know the total network data transfer (including ...
0
votes
1answer
19 views
Start daemon process within BaseHTTPServer
In order to allow helpdesk to restart an Oracle Instance, we are trying to implement a small python webserver that would start a shell script that starts the Oracle instance.
The code is done and it ...
0
votes
2answers
17 views
Adding a timestamp to a file, python subprocess linux
I’m trying to take a picture with my Raspicam on my raspberry and adding a timestamp too each picture. The code that I use doesn’t however work. It gives me a syntax error at .."+%H...
I have mucked ...
0
votes
0answers
7 views
Django/Linux, delegate asynchronous task to windows (celery??)
I need some advice with system designing.
I want to create system which will be save file uploaded by users via WebBrowers (I will use django on linux). Each uploaded file should be validated. The ...
0
votes
3answers
43 views
Unable to write to file, bacuse of permission issue
I have a script (which resides in /path/to/myscript) which opens a file and writes to it.
outfile = open('/path/to/myfile', 'wb')
Now I have the permission to write in /path/to. But the users who ...
1
vote
0answers
21 views
Scipy won't recognize my BLAS path when installing
I want to install scipy on a machine where I am not root following the instruction I found on this page but I meeting a BLAS not found error despite the fact that BLAS is install and "properly ...
0
votes
0answers
15 views
How would I streaming the last 60 seconds of audio in python [on hold]
I am working on an application that will constantly record the last 60 seconds of audio around the computer. At any moment I would press a key and it would save that audio for processing later.
...
0
votes
1answer
36 views
input() is not working inside a process [duplicate]
I need an input() in a process for my application. I wrote a small test because I have experienced some problems with it.
from multiprocessing import Process, Queue
class InputCatcher(Process):
...
0
votes
0answers
17 views
how to impersonate in linux
I have developed a multi-platform desktop application in python and PyQt and in it i want to implement the concept of impersonation. I have a requirement where user selects a file and the the ...
0
votes
1answer
23 views
How to check if a string is a valid JSON in python
I have a python script providing command line / output in console on remote linux.
I have another script which is reading this output on local machine.
Output is in below format:
ABC: NEG
BCD: NEG
...
0
votes
0answers
13 views
javascript for pinging in Controller or View in web2py?
If I have a program like below, that need to be used in web2py, should I put this in controller or view ? Below is a jquery code that was from this link http://jsfiddle.net/GSSCD/203/
The below code ...
0
votes
1answer
67 views
Linux TCP strange behavior
We are trying to analyze the behavior of various TCP implementations (Windows 8, Ubuntu 13.10). For that, we are using Scapy, a Python tool that you can use to craft packets, send them over the ...
2
votes
1answer
29 views
How to pass error message from shell script to Python script?
I am calling shell script from Python script using subprocess module. In my below python code, shell_script is my actual script.
proc = subprocess.Popen(shell_script, shell=True, ...
0
votes
2answers
45 views
how does one install python modules
I need to use PyVCF (python module specific for variant callers) for use within my own account on a remote server, and have been attempting to install the module. I suppose my question applies more ...
0
votes
0answers
24 views
usb magnetic card reader on raspberry pi
I have purchased the following card reader ( http://www.uicworld.com/proimages/Products/MSR240/MSR240_brochure.pdf ), and it does not work with the card reader program that I developed using a ...
0
votes
0answers
29 views
How disable buffering output of process, which was started in Python by use execl?
I'm a new person in world of python and I've a problem with buffering (but I think is not exactly python problem). I want write my own debugger under linux. I need redirect stdin, stdout and stderr to ...
0
votes
1answer
16 views
How to use an older version of glibc, for Python script to work on REHL 3, using PyInstaller on CentOS6
I have a RHEL3 server with Python 2.2! I need to run some scripts on that machine using 2.6 Python.
So I also have a CentOS 6 with Python 2.6. I wrote the code and used PyInstaller to give me a ...
2
votes
0answers
46 views
Compile Makefile from Linux on Mac OS
I am trying to port a Linux app (C++ and Python-based code) on Mac OS X 10.9.2 (later on Windows).
The Linux version works pretty well and the command "make" build the necessary files in order to run ...
0
votes
1answer
9 views
numdisplay ds9 crashes on Debian linux
I started to use python as an astronomer and I have been using the package numdisplay to display and manipulate images on SAO ds9.
The computer lab of my university has recently updated the linux ...
4
votes
0answers
51 views
Python - how can i make the client to be able to connect multiple times?
When i use client1 = HTTPClient('192.168.1.2', '3') only it works but when i use both as below:
client1 = HTTPClient('192.168.1.2', '3')
client2 = HTTPClient('192.168.1.3', '3')
then the whole thing ...
0
votes
1answer
30 views
opencv installation ffmpeg error
I have been trying to install opencv for a long time in my fedora 20 32 bit system.I followed the instructions from ...
-1
votes
0answers
33 views
Error while running the python code on ubunu12.04 LTS
Please find below the snippet of code am running, i get the below mentioned error while executing this snippet on ubuntu12.04 LTS 32 bit, please let me know if any one has gone through this same setof ...
0
votes
0answers
9 views
How to do Printing of values as table in below add button on same page in web2py?
I have created a form that takes server ip, username and password. I use pexpect to ssh into remote server, run a particular command and get basic data related to that server.
I am creating the form ...
1
vote
1answer
50 views
Linux: write to stdin of python interpreter process and have that process evaluate input as code
I am running gnu linux (Linux Mint to be specific). The following is my desired workflow:
I open vim in (say) process 1000 and then start up a python interpreter in process 1001.
I write some code ...
1
vote
0answers
27 views
pylab.imshow() command brings up blank figure
I'm very new to working with Ipython and the Ipynotebook, but I need to for an upcoming class. Using the notebook, I imported pylab, created a data set using a matrix, and tried to display that data ...
3
votes
3answers
83 views
shutting down computer (linux) using python
I am trying to write a script that will shut down the computer if a few requirements are filled with the command
os.system("poweroff")
also tried
os.system("shutdown now -h")
and a few ...
0
votes
0answers
28 views
multiprocessing python pickle
I don't know very well if this question it's no the same that other pickle and multiprocessing python problems described in others posts.
In post: Python multiprocessing pickling error
I ask for ...
0
votes
0answers
43 views
Regular expression in python [closed]
I am trying to SSH one of our management box and expecting some expression to do the login action.
I want to know what is the regular expression for some example like "hostname#".
hostname could ...
0
votes
0answers
14 views
The way to distribute external packages with Python program
I have a Python program that uses several external packages like:
pySerial
pytftp
scapy
etc
I have installed the packages from sources on my Linux computer.
Is there way to easily deploy my ...
0
votes
1answer
31 views
mod_wsgi Error on CentOS 6.5
folks. I'm very new to coding and Python. This is my second Stack question ever. Apologies if I'm missing the obvious. But, I've researched this and am still stuck.
I've been trying to install and ...
0
votes
0answers
35 views
why cpulimit makes process STOPPED?
I'm running a python script which uses networkx package to run some algorithms on graphs.
It takes a long time and has high cpu usage (99%), so I want to limit its cpu usage.
I used cpulimit on this ...
2
votes
0answers
23 views
mpl data error with cx_freeze - Linux 13.10
I am new on stack overflow and I hope I am not asking something obvious. In fact, I did quite a search online and I could not find a proper answer/solution to my problem.
I am building an open-source ...
3
votes
1answer
67 views
Opening filenames with colon (“:”) in Windows 7
I am writing a python app that should run in both Windows and Linux, but am having an issue with one of the filenaming conventions. I need to load a json file that has a colon in its name. However, ...
1
vote
1answer
55 views
Decrypt Chrome Linux BLOB encrypted cookies in Python
I have Chrome 33+ in Ubuntu and I see that the cookies are encrypted in a BLOB structure:
CREATE TABLE cookies (creation_utc INTEGER NOT NULL UNIQUE PRIMARY KEY,host_key TEXT NOT NULL,name TEXT NOT ...
0
votes
1answer
26 views
How to parse and append to flexget yaml config file?
I am trying to parse and add / remove a show from a flexget config file.
I eventualy plan to create a small webpage with checkboxes beside the show names and add / remove them but first I need to get ...
0
votes
0answers
13 views
How do i catch system Lock and Unlock events in Python or PyQt4 under RHEL
I have an application developed in Python 2.6 and PyQt4 under windows. its working fine over there.
Now we are making it a multiplatform application to support under Linux (Red Hat Enterprise Linux ...
3
votes
1answer
45 views
What are os.fdopen() semantics?
I used to think that os.fdopen() either eats file descriptor and returns a file io object, or raises an exception.
For example:
fd = os.open("/etc/passwd", os.O_RDONLY)
try: os.fdopen(fd, "w")
...
-1
votes
1answer
35 views
Compare two folders and copy the difference to a third folder
in this link you can see what I did
I am beginner with python and I have to do the same for my work. (link included)
filecmp- code compare directories, take the different files. Everything okay ...
1
vote
1answer
22 views
What is the correct way to include localisation in python packages?
I am writing my own python application and I am wondering what is the correct way to include localisation in source distributions. I struggled with the documentation of setuptools; localisation is not ...
2
votes
1answer
51 views
Python scripts hang on exception until ctrl-c
I have an issue with running python scripts on one server running RH Linux with Python 2.6.6. When I run any script and it produces an exception, the script hangs until I press CTRL-C and then it ...
0
votes
0answers
28 views
python fabric error 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
I am getting following error when I run fabric
(ENV)[root@server-124 ENV]# fab
Traceback (most recent call last):
File "/usr/bin/fab", line 9, in <module>
...
0
votes
0answers
49 views
Setting environment variables accessible to program in root
I'm encountering an issue with my program not finding the environment variables when it is run as root. I currently have the program do:
#!/usr/bin/python3
from i2clibraries import ...
0
votes
0answers
21 views
Custom clipboard manager
I want to write a clipboard manager for Linux, but I have no idea where to start. I want to replace functionality of current behavior of CTRL+C and CTRL+V. Imagine that I want to change contents of ...
0
votes
0answers
32 views
Python 2.7: Tkinter create Tree with checkbox without using Tix
I found an example using Tix to create tree with checkboxes:
How to create a tree view with checkboxes in Python
But I don't want to install Tix, so I was wondering if I can create something similar ...
-1
votes
1answer
29 views
cloudera 5 python API cannot create cluster
I have installed the new cloudera 5 manager by manual installation
wget http://archive.cloudera.com/cdh5/one-click-install/redhat/6/x86_64/cloudera-cdh-5-0.x86_64.rpm
rpm -ivh ...