Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

1
vote
1answer
87 views

How to activate Virtualenv when a Python script starts?

I want to schedule a python script to run using cron on certain dates, the problem is that in order for example.py to work, example-env has to be activated, is there a way to make example.py activate ...
3
votes
2answers
60 views

How to locally install .deb without apt-get, dpkg or root access?

I'm using python on a Linux cluster (without root access) and want to use the numpy module. After downloading numpy from Numerical Python, extracting and trying to install it with: python setup.py ...
1
vote
2answers
58 views

Invoke python script through make command

I have a tool with 5 python scripts say A.py, B.py, C.py, D.py and E.py. I have to run this program in Linux. A.py is the one program I run which imports other files and uses them. For running A.py, I ...
6
votes
0answers
29 views

How do I activate Xorg record module on Raspian?

I'm trying to automate some tests on my RaspberryPi and I'm using python's pymouse to perform some emulated clicks. On my Debian it works fine, but when it comes to Raspian it keeps failing with this ...
0
votes
1answer
60 views

How to catch first line of stdout from bash process substitution?

I am working with the following block of bash and it is not printing out the first line of expected output: exec 3< <(python3 -m http.server) while true; do read -t 2 line ...
0
votes
0answers
67 views

python install on linux RHEL5 - GCC 4.1.2-52

I used the following guide from the Beyond Linux From Scratch SVN Book, not knowing that my distribution was actually RPM Based (see comments), and now I am getting the following error during python ...
2
votes
1answer
30 views

preventing dpkg-buildpackage using /usr/bin as installation destination

Briefly, I am building a Debian package. Everything works fine with packaging except the point, that after packaging my application is always in the /usr/bin folder. It's actually a Python ...
1
vote
1answer
148 views

Installing DevedeNG in kali linux, but missing python dependency it says is already installed

As you can see in the picture it says dependency is not satisfiable, but when I try to install the latest version of python3 the command prompt tells me i have the latest version installed.. Any ...
1
vote
2answers
79 views

How can I install youtube-dl on BOSS linux?

I try to install youtube-dl on BOSS Linux by following commands. $ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get update $ sudo apt-get install youtube-dl $ sudo pip install ...
0
votes
1answer
77 views

What changes to be done in Python file when Makefile is being used?

I have a set of python class files. I run the MainProgram.py on the linux as python MainProgram.py which uses the rest of the class files.It reads from an input file and write an output file. Until ...
2
votes
1answer
57 views

How to monitor the opening and closing of files?

I'm writing an AI personal assistant. One part of the software is a monitor daemon. A small process that monitor's user's active windows. I'm using python( with libwnck and psutils for obtaining info ...
0
votes
0answers
63 views

Running lpr through command line and through python different outcome

When I run lpr <filename>.jpg the file prints out boderless (this is what I want). When I run subprocess.call("/usr/bin/lpr " + tmp.name, shell=True) from a Python program, it prints out with ...
0
votes
1answer
48 views

systemd daemon & python getting the wrong time

I made a daemon that it is started by systemd, and inside my daemon I have a python function to get the time. The problem is that the time is wrong, I have 8 hours of difference. This is my service ...
0
votes
1answer
72 views

Fixing a broken PYTHONPATH environment variable

I recently installed some software, which required python to operate. For some reason, it installed its own version of python, and modified the PYTHONPATH variable. Now, when I attempt to import a ...
0
votes
1answer
38 views

Packages Containing 'dfsg' in Version Number Causing Issues

I am running the same Python software under both Mint 13 and Mint 17.1 – both are 64-bit. Prior to 64-bit operation the software was running on Mint 13 32-bit. On 64-bit Mint 13 everything works as ...
0
votes
1answer
185 views

Fix version issues of Python on CentOS 6.6

I'm very new to Linux and Python as I am an intern, please bare with me. If I'm missing something then let me know I can update the post. I installed python 2.7.9 under a users directory on centOS ...
2
votes
2answers
54 views

stderr gets flushed before stdout, when using file logger

My python code: import sys print "i am a daemon" print "i will be run using nohup" sys.stderr.write("i am an error message inside nohup process\n") When i run the code as python a.py, it shows, i ...
1
vote
1answer
69 views

Can't use Python3 Package Installer

I successfully installed Python3's Pip and SetupTool packages by: sudo apt-get install python3-pip but when I try to download/install any package for Python3 by: pip install <package-name> ...
0
votes
1answer
260 views

pip install gives “TypeError: 'int' object is not iterable ”

In Debian testing, when I try to install the python package python-constraint via pip install python-constraint I get the following error; Exception: Traceback (most recent call last): File ...
0
votes
0answers
81 views

Run Git Pull from a shell start-up script

I have raspberry-pi that loads a shell script on start up. This script runs a python script 'boot_camera.py' which is found in a repository. I Have a server which sends the raspberry-pi a command ...
1
vote
1answer
48 views

Url Decoding shell script

How can I store the url-decoded string in a variable using shell script #!/bin/sh alias urldecode='python -c "import sys, urllib as ul;print ul.unquote_plus(sys.argv[1])"' ...
1
vote
0answers
50 views

How to use vim-slime from within a single tmux session?

I'm trying to integrate ipython and vim through a single tmux session using the popular vim plugin "vim-slime." The problem is that while I can get it to work fine provided that vim is opened in a ...
0
votes
0answers
96 views

Centos 7.1.1503 no longer has some static libs that python packages assume are present

I ran repoquery -ql readline-devel and it revealed that only various .so libs are a part of this repository. /usr/include/readline /usr/include/readline/chardefs.h /usr/include/readline/history.h ...
1
vote
1answer
62 views

How do I make Python plugins work in Pluma?

I'm trying to add the Python plugin trailsave to the text editor Pluma* (which is a Gedit fork) but the plugin doesn't show up in the "Active plugins" list in the Pluma preferences. Also, I have ...
1
vote
0answers
38 views

setting up pycurl for embedded ARM

I am working on a linux x86_64 machine, and I am trying to set up pycurl for an embedded ARM processor running petalinux. I need pycurl library before building the embedded linux image. I have ...
0
votes
2answers
77 views

Service start fails after Capistrano2 deploy task

Below is a part of the /etc/init.d script that controls a daemon. The full init.script is available at http://pastebin.com/02G5tpgH case "$1" in start) printf "%-50s" "Starting ...
1
vote
0answers
25 views

Passing a parameter to a dstat plugin

I wrote a simple plugin (dstat_externalBackup.py) for dstat to monitor the filesystem free space and placed it in /usr/share/dstat and it works as intended. € dstat --externalBackup 3600 extern free ...
2
votes
1answer
103 views

Compiling Python 3.4.3 error

I have been trying to update Python 3.4.3 from source, but each time, during the ./configure command, I get an error in the configure.status > configure: checking for device files checking for ...
4
votes
2answers
240 views

How to list all object paths under a dbus service?

This is a follow-up question to A list of available DBus services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): ...
13
votes
3answers
2k views

Why does python still work after being removed?

On Debian 8 jessie I've removed python: perry@perry:~$ sudo apt-get remove python Reading package lists... Done Building dependency tree Reading state information... Done Package 'python2.7' ...
0
votes
0answers
48 views

QtPy5 on Raspbian, getting ImportError: cannot import name QtCore

I need to be able to use the latest WebKit that includes WebRTC support How do I install Qt5+QtPy5 on Raspbian? What I have tried so far... Installed Qt5 on RPi2 - PASS Native build Qt5 on RPi2 ...
0
votes
0answers
9 views

Pip managed python extending distribution packaged modules

I am looking for recommendations on extending the python library managed by my arbitrary distribution with packages available via PPI. Basically I have been working with a distro managed installation ...
0
votes
1answer
38 views

Debian Lenny Adafruit_BBIO failure to install

Im sorry if i have this in the wrong forum, but im not sure where to put this. Google Groups is going to be too slow in a response (They are where i posted to first). I have Debian Lenny installed on ...
1
vote
2answers
58 views

IPython Qt Console doesn't have a title in GNOME app switcher

When I use the app switcher in GNOME 3.16, the IPython Qt Console (version 3.1.0) doesn't have a title under its icon (see image, and compare with Chromium). I also noticed that the icon doesn't ...
0
votes
1answer
51 views

Log output from more than one script

I have a problem concerning the logging of a process: I have 3 scripts, a.py, b.py and c.sh a.py calls b.py and b.py calls c.sh The goal is to continuously log std out/err (write to file and ...
0
votes
1answer
49 views

Crontab giving no result

I have set up a cronjob on my server which is supposed to run every minute and store the output in the given file. I have been trying a lot and saw a lot of links but nothing seems to work. Following ...
2
votes
1answer
86 views

Convert TeX accents to UTF-8 in Python

edit below First of all, I am quite sure this is a duplicated question. But I have no idea how to search for it. I spent quite a long time already. I am reading with python from a .txt file the path ...
0
votes
0answers
18 views

Can I update python within a user scheme?

I'm running python on a shared server without root access. I've installed pip using the user scheme which allows me to install the packages I need. I can't find any documentation on how to do an ...
1
vote
2answers
92 views

Installing VIM with Python support locally without sudo

I'm trying to install VIM with Python support on Linux without sudo, but for some reason VIM always gets installed without python ( -python in vim --version ) I first installed Python locally by ...
3
votes
2answers
290 views

Why do I receive a “/bin/bash cannot find command” error for an alias?

I am using multiple python, I alias python3 to py: alias py="/opt/python3.4/bin/python3" I want to run python in vim so I write this: map <F9> :call SpecialCompileRun()<CR> func! ...
1
vote
1answer
149 views

Python now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using Python

For these commands (in both bash and fish): sudo emerge eix emerge eix I get this error: usage: emerge [-h] [--version] [input [input ...]] emerge: error: argument input: can't open 'eix': [Errno ...
0
votes
1answer
196 views

Can't use apt because python encoding issue

I'm getting a python unicode error every time I try to install or update anything with apt or aptitude, preventing me to update my system. The error I'm getting is the following: File ...
0
votes
2answers
16 views

A file containing exports

I have a file containing the following: export PYTHONPATH=/home/myuser/squish-5.0-xyz/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/myuser/squish-5.0-xyz/lib I don't what to place it in my ...
2
votes
2answers
40 views

Cron job is writing the error to error log but fails to write outputs to output log file

I have 2 python codes which i schedule using cron. My codes actually runs from 10:30am to 4:20pm everyday. from 10:30am to 11:00am my codes outputs 2-3 lines every minute and after that they start ...
-1
votes
1answer
50 views

How do I set an environment variable in the shell to be result of python script? [duplicate]

If I run export TEST=script.py echo $TEST It outputs script.py script.py code: return 5 can TEST be set to 5? Obviously script will do something in future not just return a number
1
vote
2answers
71 views

Checking desktop environment from command line

I am using SSH to login into my Linux RedHat server from my Windows machine. I want to create a GUI in python on the server but I am not sure if there exists any Desktop environment on the server. I ...
0
votes
1answer
137 views

RuntimeError: You need gevent installed to use this worker

I need gevent to run docker-registry but i have this error: Error: class uri 'gevent' invalid or not found: [Traceback (most recent call last): File ...
1
vote
1answer
169 views

Getting Python errors whenever I try to use terminal in Linux Mint

I've had Mint installed as a dual boot on my laptop for some time. I use it as my dev environment, for desktop and web related coding. I recently started getting errors which have rendered my terminal ...
2
votes
0answers
117 views

How to get scapy to sniff on the correct interface?

The sniff function in scapy in python2.7 worked fine before upgrading my linux Operating System. from scapy.all import * client_mac="c4:3d:c7:8f:03:19" wlan_mac="00:c0:ca:6d:ac:fa" ...
0
votes
0answers
148 views

Incorrect installation of python-2.7.2 - cannot use zlib

I am installing python 2.7.2 from Python-2.7.2.tar on Linux Ubuntu-14.04. I untar it, then ./configure --prefix=/apps/python/install/2.7.2. I then make and get : Python build finished, but the ...