Tagged Questions
0
votes
0answers
20 views
Python 2.7 & Linux - Memory release issue
I'm running twistd server with python script which does next:
1. Accepts user's request
2. Analyzes it
3. Creates worker for current request and runs some data extraction based on it (from internal DB ...
2
votes
0answers
22 views
RabbitMQ, PHP, Python
I am stuck and need an advice.
I have a PHP script which generates over 1 million emails per hour. On the current setup, these emails are put into an SSD drive folder and a python script monitors ...
1
vote
2answers
40 views
How to match filenames in different directories?(bash or python)
I have a set of files in two directories
~/Desktop/dir1 and ~/Desktop/dir2
I need to match files in dir1 to files in dir2 or vice versa
filenames in /dir1 are: 1.out, 2.out ... 21.out
filenames in ...
1
vote
1answer
31 views
Parallel processing with multiprocessing is slower than sequential
I have a code that I need to parallelize. The code itself works without issues.
The code is a method of a python class. For example,
class test:
def __init__(self):
<...>
def ...
0
votes
2answers
7 views
Need to connect HP QC from linux machine using Python script
I want to automate my result posting stuff in QC using my Python script and that too form Linux machine. I have a lots of examples and stuffs to connect to QC in Windows using wincom32 module for ...
0
votes
1answer
22 views
Send messages to ZeroMQ server using conventional TCP, possible?
I'm not sure if I'm doing this right, but I would like to be able to send messages to my server running ZMQ from normal TCP connections. The server is running Python ZMQ on port 5555 using a TCP ...
-4
votes
0answers
33 views
Python restarting itself after x amount of minutes? [on hold]
I'm working on a script, and I need to make it so it automatically restarts itself after 5 minutes but I cannot find any way. I tried cronjob etc. but it didn't work. I'm working on a Linux Mint.
0
votes
0answers
19 views
Skype4Py: Authorizing incoming buddy requests
I'm trying to write an app that automatically handles Skype Authorization requests. The final purpose is to allow platform users to attach & confirm their personal Skype handles by messaging a ...
0
votes
0answers
23 views
How to find reason of bug with limits? [duplicate]
After a some time when my Scrapy spider works on server (on my PC all good) I get an error
Traceback (most recent call last):
File ...
0
votes
0answers
26 views
python - how register user with xmpp
I'm trying to register a new user, but not work. I get the following error:
AttributeError: Client instance has no attribute 'SendAndWaitForResponse'
this is my code:
import xmpp, sys
usuario = ...
-4
votes
0answers
34 views
os.kill(pid,0) does not finish process. [on hold]
Here is brief description. I am using os.kill(pid,0) to kill the process if it still exist. There has to be run second command while first command running. I'm using function founded in other post. ...
0
votes
1answer
24 views
Perform additional actions upon read or write to filesystem
How can I perform additional shell actions when a file is read or written to a linux mounted filesystem (local or otherwise)?
I'm specifically looking to:
make database or rpc calls (via ...
0
votes
0answers
39 views
Change path on Python without deleting the original one
I am using version 2.4.3 of Python. When I use Cassandra's cqlsh, it says
No appropriate python interpreter found.
I think this is because the current Python version is too low.
I downloaded ...
0
votes
0answers
46 views
Python script doesn't start
I'm just starting with Python and Linux.
I made a program with Python that comunicates with a serial LCD over the ttyS0, and made a script to start it at boot. I disable the line ...
0
votes
0answers
39 views
BUG: bad unlock balance detected
I try to run a python script on linux and I have the following error :
[ 590.744579] =====================================
[ 590.749299] [ BUG: bad unlock balance detected! ]
[ 590.754024] ...
1
vote
1answer
24 views
Code not working how I expected (Python 3.x.x) [duplicate]
I've recently being self teaching python and I'm making my first attempt at a game. The idea is the user must guess what the answer is (integer) My code is not yet complete but the first half won't ...
-2
votes
1answer
28 views
How to pass arguments to deployment script?
I currently have a structure for deployment which look like this:
On the target machine I have a /versions/ directory with the built versions:
/versions/1.0/
/versions/2.0/
etc
To ...
1
vote
1answer
68 views
bash shellshock update causing script to behave differently
This is one of the things that happened since we've updated our bash ( due to the Shellshock thing )
This is the code that I'm testing:
#!/usr/bin/python2.4
import subprocess, os
p = ...
0
votes
1answer
9 views
SimpleGUICS2Pygame Installing on Linux
Python.
I've exhausted my research on this topic. I have it running on Windows just fine, but I can't figure out a way to install it on Linux.
How do I install it on Linux?
1
vote
2answers
23 views
Is there an error log file for linux that shows file open failures?
I just blew a few days tracking down a bug in a python script (unknown to me, web2py used a different root directory from what i was expecting, leading to a file read to fail silently. Thus when run ...
1
vote
1answer
40 views
How to intercep each line of stdout after issuing a command at prompt with python
I have written a python script that is doing the flowing;
Connect to a LUN
Mount the drive
Backup my home drive to that LUN
All of the above is saved in a log file, everything is working as it ...
0
votes
1answer
27 views
python ctypes foreign library initialization and uninitialization
I am wrapping this c library called pvcam (Photometrics Virtual Camera Access Method) in ctypes and for the most part it works. The problem is I cannot get the library to uninit. When ever I try to ...
0
votes
0answers
25 views
Fail to install Python with “error: C compiler cannot create executables”
I want to update my Python to version 2.7.8,and here occur the error:
jharvard@appliance (~/Downloads/Python-2.7.8): ./configure
checking build system type... i686-pc-linux-gnu
checking host system ...
0
votes
0answers
26 views
R-pi running a gpio script on boot
I have a script that needs to run when the raspberry pi boots (Raspbian- latest version, the pi is a model B+). The script needs to be none-blocking, and accesses the GPIO pins, so needs to run as ...
1
vote
1answer
13 views
GNOME: Inhibit shutdown while backup is running
System: Debian 7 32bit
I'm trying to prevent the shutdown of my laptop during backups (obnam), and I think I can use inhibit to do so.
I found information on how to do this here, but when I execute ...
0
votes
2answers
53 views
Python script works run from dir but not as CLI cmd, despite setting $PATH and shebang
Please skip straight to EDIT 3 for the cause of this problem (end of this post)
TL;DR — the editor did not save the shebang line, though I'm not sure why.
I've made a script that just cleans the ...
0
votes
1answer
22 views
raspberry pi bluetooth and lego mindstorm
I am trying to get a lego mindstorm ev3 to communicate with a Raspberry Pi. I am able to get the mindstorm to send data to the Pi but the data is not human readable. My end goal is to be able to send ...
1
vote
1answer
18 views
Conda build a 32 bit package on a 64 bit machine
I have been using conda as a package manager for a lot of my work and its really helped keep the environments of multiple people in check with both Python and binary packages. Its been all sunshine ...
0
votes
0answers
9 views
How to filter recorded X events with Python Xlib
I need to be able capture system-wide key shortcuts (media keys) for my media player app. On Windows I am using pyHook module which can filter or pass caught event. I was looking for universal ...
-1
votes
2answers
37 views
python - ctypes error with mysql c
I create a library with c, but when I call the library in python shows me the following error:
Traceback (most recent call last):
File "probrar_lib.py", line 6, in <module>
lib = ...
0
votes
1answer
38 views
Using Python to create SFTP users in linux
I created the following to create SFTP users in a linux server. Is there a better way to implement this? The script works by generating a username after checking if the user already exists. Then ...
0
votes
0answers
13 views
Missing libpython2.6.so.1.0 after install
I am currently trying to run a piece of old software that was originally built on a cluster using Python2.6 libraries. During the installation of that program, Python2.6 was specified as the Python ...
0
votes
3answers
46 views
Crontab for sending mails
I created my send_newsletter admin commands with django, when i'm using the
python manage.py send_newsletter
it works.
My send_newsletter.py
sys.path.append('/srv/apps/')
...
0
votes
0answers
16 views
OpenCV windows always minimized on Linux
i have a problem with OpenCV in Python2 on Linux. Whenever i open up a window, it starts minimized. Is there any easy way to force the window to start on top?
my code:
import cv2
video = ...
0
votes
0answers
18 views
pypyodbc doesn't connect when isql does?
pypyodbc has worked for me in the past, but for some reason it's not working. I have this defined in ~/.odbc.ini
[as400]
...
0
votes
2answers
55 views
How to keep run Python Program in Background on Raspberry Pi after terminate ssh
i need to keep run my Python Program in Background on my Raspberry Pi after i close the ssh connection, Because i need to save Phidget information on a SQL DB
I try to do this with nohup but it seems ...
-2
votes
0answers
17 views
beautiful soup - multiple URLs from Linux Terminal
So I'm trying to crawl multiple URLs with Beautiful soup, it's looking for certain html tags (title, meta, content and date). I can get it to work with a single URL but not with two. I imagine this ...
0
votes
2answers
18 views
Executing reboot command over SSH using Paramiko
I use Paramiko for establishing SSH connection with some target device and I want to execute reboot command.
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
...
0
votes
0answers
8 views
How to start redis server and config nginx to run mediacrush script on CentOS?
I found a MediaCrush open source from here
https://github.com/MediaCrush/MediaCrush
But stuck in last steps.
I started the Redis server, use command
$redis-cli
that received the "PONG" ...
0
votes
1answer
29 views
Python/C API gcc compile warning unused variable
I have been trying to embed python into c. I am on Linux Mint 17 and installed python-dev. I have been following the documentation on https://docs.python.org/2/extending/embedding.html I was able to ...
1
vote
1answer
44 views
How do I invoke a text editor from a command line program like git does?
Some git commands, git commit for example, invoke a command-line based text editor (such as vim or nano, or other) pre-filled with some values and, after the user saves and exists, do something with ...
-1
votes
1answer
38 views
Bash script transfer to Python - copy logs from server to another remote server
I have done my easy script in bash - this script should transfer the file with the specific new name from server 1 to remote server 2.
Can someone help with this and transfer all script to Python.
...
0
votes
1answer
35 views
Python show all installed packages
Is there a way for python to show all apt/yum packages installed on a server? I have a program that can only grab one package that I specify but I'd like to know if there is a apt-show-versions/yum ...
0
votes
0answers
27 views
Trouble with Python Libraries Between Different Nodes
I am trying to run a python script on a linux box with a specific version of python and I'm having some trouble. Every time I try to run the script on the linux box I get the traceback pasted below. ...
-2
votes
0answers
21 views
creating folder every day in the name of the current date in python
i am doing a simple timelapse photos that will be uploaded to a ftp server. I am trying to upload it by Current date named folder created everyday but i am missing something and i am getting error as ...
2
votes
0answers
57 views
Resource leak when launching subprocesses with subprocess.call()
I am writing a Python crawler to clone git repositories and analyze them. I am using subprocess.call() to clone a given repository. The problem is that after only a few repositories, I get a "OSError: ...
0
votes
0answers
40 views
Easy_install https unknown url error in python 3.3
I'm installing python 3.3 on Suse Linux EC2 instance on amazon. The instance has already python 2.6 installed, so after installation of python 3.3 I work on virtual environment.
When I run ...
0
votes
2answers
27 views
print in new terminal window
i wrote an script that have multiple threads and in this threads i used "print()" code to print log activity about that thread, but the problem is i don't want to print all these logs at one terminal ...
-3
votes
1answer
48 views
Why (0x7FFFFFFF >> 31) + 1 is zero?
In python command line, it gives 1 and I want this answer.
But 'Putty' gives me 0, and I don't know why? Could you guess?
0
votes
1answer
47 views
How not to allow pygame to change my screen resolution in Linux?
I've recently written a shell script which boots my Windows Python application with wine:
#!/bin/sh
wine data/Python/x86/python.exe loader.py 'x86'
While the program is running, everything works as ...