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

learn more… | top users | synonyms

0
votes
0answers
7 views

Question about sys.argv (python) [migrated]

sorry to ask a basic question, but it is hard to find on google. anyway, I have a program that does math from numbers found in various .txt files. one thing I would like to add is a -show argument to ...
0
votes
1answer
10 views

Python3.4 package for Debian Wheezy

I'm looking for a way to get python3.4 for debian wheezy. I've been looking on repos but all I could find is 3.2 version. Does anybody know where I can find 3.4 package? (Or maybe does anybody know ...
1
vote
0answers
22 views

Make PyCrust use Python 3

I make successfully python 3.2.3 by opening it through terminal, I make it by alias python="python3" But when I open the PyCrust IDE, it opens up with Python 2.7.3, not 3.2.3. How can I make ...
0
votes
1answer
32 views

Python output in XML format

I have a python script which compare IP list with IP Database and gives output of matching criteria. (I got the script from this forum). convert.py #!/usr/bin/python import socket,struct ...
0
votes
1answer
60 views

apt-get without sudo?

I am trying to install YouCompleteMe (YCM) on my user account on a Debian machine. The installation guide says we need python-dev for YCM to work: sudo apt-get install python-dev My question is: ...
1
vote
0answers
29 views

CentOs7 Python 3.4 Install Method

This post relates to this question where I was asked to explain how I installed python3 on my system. I was attempting to install python3 on my system for development purposes. Something went wrong ...
1
vote
1answer
45 views

CentOs 7 Python Issue “-bash: python: command not found”

I asked this at stackoverflow, but just realized it might be best here. If I need to delete it over there or should not have posted here, please let me know. I am still new to this site. Thanks in ...
0
votes
1answer
64 views

get values which only ocurre once in the vector

there is a vector of numbers I have which ascend (it is called t8_) 2 7 8 9 11 15 34 91 91 92 94 the problem is that some number happen two times - I don't want to remove them but they have to ...
1
vote
2answers
61 views

How do I get the output of a program already running?

I have a python program that outputs to stdout and a log file. However, the person I am making this for wants to know if I can set it up so that he can see the output of the file, while it is ...
1
vote
2answers
50 views

How do I program Python so that it outputs to all terminals in Linux

I am programming a python program for the raspberry pi. Is there a way for me so that when the raspberry pi outputs text, it will show up on all terminals that are currently remotely logged in via ...
0
votes
1answer
19 views

How to monitor the screen lock/unlock in the Ubuntu 14.04

I need to implement a function that monitor the screen lock/unlock. I referred the following article: Run script on screen lock/unlock My python script code works fine in the Ubuntu 12.04, but ...
-1
votes
2answers
16 views

OpenDNS automatic diagnostic

I've contacted OpenDNS support because advertising are not filtered on this site http://www.backpackerboard.co.nz/ They asked me to read this manual instructions ...
1
vote
1answer
20 views

How to append to an environment variable using an .env file?

Assuming the .env file is loaded before execution, how can you append to it without overriding it? DEBUG=True FOO=BAR PYTHONPATH="/Users/James/project/" The above file would (?) override it, and ...
0
votes
0answers
105 views

Receiving “Unable to correct problems, you have held broken packages.” after trying to install python -setuptools and python-pip

I ran "sudo apt-get install python-setuptools python-pip" but I received: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be ...
1
vote
1answer
20 views

calculate numbers on end and merge to one line

So in a file i have lines like these: thisdata:thisother:1337 thisdata:thisother:1800 thisdata:thisother:1500 thisdata:thisother:46984 I would like to output: thisdata:thisother:51621 for all ...
1
vote
1answer
14 views

Cron Job to Keep Daemon Running?

let us suppose I have a cron job like this: */15 * * * * /path/to/thedaemon The daemon (it being a python daemon via from daemon import runner) will not allow multiple instances of itself, which in ...
1
vote
1answer
23 views

Ran into a problem running Bpython

I used the sudo apt-get install bpython command to install bpython. Now when I type bpython, I get an error: Traceback (most recent call last): File "/usr/bin/bpython", line 5, in <module> from ...
1
vote
1answer
27 views

How the Python suffixes obtained by imp.get_suffixes() are set (in particular in Debian Jessie)?

The command python -c "import imp; print(imp.get_suffixes())" prints a list of tuples with suffixes used when importing modules (see the doc of imp.get_suffixes). Usually it is simply: [('.so', ...
1
vote
2answers
46 views

about executing a python program in a shell script which is scheduled on crontab

i have a problem with regards on crontab. I have a script named checker.sh and i want to schedule it that would run every minute: * * * * * sh /home/pi/checker.sh so i have the script here: the ...
-1
votes
0answers
13 views

How to fix Python ValueError:bad marshal data? [migrated]

Running flexget Python script in Ubuntu, I get an error: $ flexget series forget "Orange is the new black" s03e01 Traceback (most recent call last): File "/usr/local/bin/flexget", line 7, in ...
0
votes
1answer
28 views

Error installing scipy

I'm on Manjaro trying to install scipy in virtualenv using pip. I get this error. How to fix it?
0
votes
0answers
19 views

invoking python program for each path in makefile vapth

I have a makefile as follows: VPATH = ../../HWP \ ../../hwsv/server \ ../hwpf PROC_INPUT_FILES = abc.c \ def.c \ xyz.c MEM_INPUT_FILES = ...
1
vote
1answer
47 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
42 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
44 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
20 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
52 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
49 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
27 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
96 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
59 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
59 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
50 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
38 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
35 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
40 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
88 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
40 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
59 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
223 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
57 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
46 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
34 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
66 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
44 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
31 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
65 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
19 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
92 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 ...