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

learn more… | top users | synonyms

0
votes
0answers
51 views

How to install linux-gpib Python bindings inside virtual environment?

I'm working on developing Python code to control GPIB devices, and am realizing the more I learn the less I know. So here's my question: I believe I've installed linux-gpib properly, and I have ...
0
votes
1answer
41 views

NS-3.25 PyViz visualizer install on CentOS 6.5

I'm installing Network Simulator 3.25 on a CentOS 6.5 machine. In my environment I cannot use any repository, every single packet have to be downloaded from a machine and then transferred to the ...
2
votes
2answers
76 views

Make python file accessible from anywhere by all users

I installed a program that requires you to execute a python script like this: python fit_locus.py --help I want to make the file acessible to all users without requiring them to navigate to the ...
3
votes
1answer
55 views

Create table with frequency of unique names retrieved from multiple .csv files

I have 32 CSV files containing fetched information from a database. I need to make a frequency table in TSV/CSV format, where the names of the rows are the name of each file, and the names of the ...
3
votes
3answers
52 views

Sudo-like remembrance of passwords for own scripts

I have a script which requires a password for authenticating a web service. A single password for a pre-defined user will suffice, and the password should if possible be stored securely (not plain ...
1
vote
0answers
10 views

Installing Python modules on ChromeOS

Is there any way you can download Python modules in ChromeOS without accessing developer mode? I am using a student Chromebook that blocks access to developer mode.
-1
votes
2answers
47 views

Where can I practice my Python and Bash scripting? [closed]

I wanted to practice my bash scripting skills and python skills and wanted a good book or a site where I can practice and get excellent skills please. Any recommendations please.
0
votes
1answer
23 views

Including milliseconds in a Script?

sudo hexdump -v -e '1/1 "%02x\n"' /dev/ttyUSB0 | awk '$1=="ed" { getline byte1 getline byte2 number = strtonum("0x" substr(byte2,2,1))+2 data =" ::ED." ...
1
vote
0answers
54 views

python weather script not working [closed]

i am using archlinux with openbox. I created a pipe menu with a python script to get the weather from yahoo. at the begining it worked fine, but then it stopped working. the python file: http://...
0
votes
1answer
39 views

How to replace a text in a shell executable file (.sh) using Python?

I have xxx.sh file which content is: setsid ./start-meteor.sh >> /home/farah/StudioInstallation/Studio/bricks/platform/log/databricksastro.log 2>&1 < /dev/null & I want to ...
1
vote
0answers
27 views

Can I do socket programming in Python on a Chromebook with Crouton? [closed]

The idea is to run a simple server on a Chromebook. Does Crouton afford that much control? I might not actually write the server in python but it'd be nice to know whether it's possible.
2
votes
1answer
41 views

File permissions while installing a python module

I would like to install sphinx-doc from the sources so I git clone the module then installed it with sudo python setup.py install. Using /usr/local/lib/python2.7/dist-packages/pytz-2016.4-py2.7.egg ...
1
vote
0answers
96 views

Installing Anaconda on a Chromebook

So I'm not sure if this is the right place for my question since I'm using Chrome OS, but I've put it in developer mode and opened a shell, which looks very reminiscent of a Unix shell. I've never ...
0
votes
4answers
61 views

Should we let Python pip overwrite modules that were installed by RPM?

Python pip and many Python modules are provided through the CentOS Linux repos. On CentOS 7.x Linux, I can install pip and pymongo with the standard distribution package manager (yum install python-...
2
votes
1answer
224 views

Systemd: How to start/stop Python script that should run in background, inside Virtualenv

On my Raspbian machine, I want a successful OpenVPN connection to my VPN provider to initiate a Python script, that persistently should run in the background as long as the VPN connection is active. ...
0
votes
2answers
50 views

python virtual environment

I have to install python package locally/globally on a machine using pip, so for I do not want to install pip on local machine. I can successfully create a new virtual environment using easy_install ...
3
votes
0answers
34 views

DD-wrt serial messages [closed]

Since I recently bricked my WDR3600 by accidentally flashing wrong firmware with mdt I had to do some soldering to make serial work. Since the window to entering bootloader cmd was really short I ...
0
votes
1answer
111 views

Python psutil version conflict for Terminator on Centos 7

This issue started after latest updates installation, probably in last 2-3 days. When I try to open Terminator I get error, Traceback (most recent call last): File "/usr/bin/terminator", line 23, ...
1
vote
1answer
18 views

Trying to get .py scripts running through apache (mod_python) [closed]

All the tutorials say to look for <directory...> </directory>, but I cannot find this in my default 000-default.conf (on my raspberry pi). Can someone explain what I am supposed to do? All ...
0
votes
1answer
57 views

How do I calculate the column percentage of a file?

I have a tsv file that contains some values. I want the sum of each column and total number of values and percentage values. Eg: file.tsv contains x 1 1 0 1 x x 1 x ...
1
vote
0answers
103 views

Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

When updating yum via sudo on our (Amazon Linux) server, I get the following error: Fatal Python error: pycurl: libcurl link-time version is older than compile-time version I find the following ...
1
vote
0answers
55 views

Start my webpy server using supervisor

I am trying to start my python web.py server at boot, but I am having difficulties getting it running by itself. I have a config-file like the following. It's basically the sample file with an added ...
0
votes
2answers
43 views

How to compile C Extension for Python

I am attempting to install https://github.com/lthiery/SPI-Py (on a Raspberry Pi running Raspbian) by running sudo python setup.py install This fails with error spi.c:20:20: fatal error: Python.h: No ...
0
votes
0answers
39 views

Terminator installed via Homebrew “Incompatible library version”

I've installed Terminator from the homebrew/gui tap, but when I ran it, it raised this error: You need to install the python bindings for gobject, gtk and pango to run Terminator. I edited /usr/...
0
votes
0answers
27 views

Enabling Yum Repos in Python

I have a set of scripts that automatically downloads packages from yum using the internal Python bindings on Centos 7. These work fine until I need to enable a repo during a package download. I've ...
1
vote
0answers
32 views

How to use a tty as a sound device for pjsua?

I have a bi-directional PCM device that appears as /dev/ttyUSBxx. It provides and consumes 16-bit linear PCM at 8KHz (though that can be changed to u-LAW or a-LAW). I would like to use the device in ...
1
vote
1answer
102 views

How / Is it possible to install python in a portable way?

I'm working on a python script which takes care to migrate a mysql database with a certain schema / structure, into a postgresql database with a different structure. During the development phase I ...
0
votes
2answers
107 views

How do I install Python in Linux with no Internet access?

Part 1 I have CentOS with no Internet access. I have a docker container based on Ubuntu. I want to install Python inside the Docker container. I downloaded some .deb files for installing Python 2.7....
0
votes
1answer
19 views

Pitfalls to symlinking python2.7 to python?

I have a CentOS 6.7 machine with the "system" python (2.6.6) installed from an RPM at /usr/bin/python. We installed an additional version installed from source (2.7.11) used for development purposes ...
0
votes
0answers
112 views

Write to terminal in Tkinter GUI

I am trying to show the changes in the command line in real time in my Tkinter GUI, I managed to create the GUI and integrate the terminal into it, but I cant bind the buttons with the terminal, my ...
0
votes
0answers
42 views

can't run any python 2 programs due to encoding error

After a system update, I'm not able to run any python 2 program. I get the error. UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 203: invalid start byte python3 says it uses ...
0
votes
0answers
26 views

Email user temporary code access code when using ssh

I am looking for a way to create my own two factor authentication for ssh. After the user enters the correct login info I would like the terminal to send an email to the user that contains a code ...
2
votes
1answer
114 views

How do I use GNOME Keyring with Python Keyring in virtual environment?

I have written a Python script that I would like to run in the background on my Raspberry Pi. The script makes use of the Python module Keyring (link), which is used to access a keyring backend to ...
0
votes
1answer
10 views

Create Multiple libvirt Volumes From One XML File

I'm using libvirt's virsh vol-create command to create multiple volumes. I've started using Jinja2 templates to help with automating the task for a specific application. In my case, it would help ...
2
votes
1answer
189 views

No module named yum

I am facing errors while running any yum commands on centos 7 system No module named yum Please install a package which provides this module, or verify that the module is installed correctly. It's ...
-3
votes
1answer
31 views

Online state change

Are there ready script in bash or python which pings target and reports only online state change? Also would nice to have average time between failures.
0
votes
0answers
106 views

How to install PyGUI for Python3?

I want to install PyGUI for Python3 on Fedora 23. From PyGUI: Linux - requires pygtk (tested with pygtk-2.14.0 and Gtk+-2.14.7). And by going to PyGTK it says: Note: New users are ...
3
votes
3answers
80 views

Creating a self-contained installation file for pymssql for CentOS

I'm trying to deploy a Python application on a machine that due to system and organisation requirements can't have gcc installed on it, so I need to create a self-contained installation file for ...
0
votes
0answers
50 views

Thumbor ImportError: No module named thumbor_plugins.optimizers.pngcrush

I'm strugling to properly install Thumbor on a server. I made my regular installation. Tested working at that time (Centos 7, Python 2.7.5) I setup supervisord to manage a deamon for thumbor I got ...
-1
votes
3answers
95 views

Shell scripting : want to login on some server, which are in same domain and execute command and exit

I have 10 unix servers, I want to log into them one by one, execute 4-5 lines of code, save the output and exit. For Example: 10 serves: Intially at xyz server Login in server 1 --> execute 4-5 ...
1
vote
2answers
56 views

Wait until gnome-terminal ends

I'm trying to implement a script who runs four terminal window in parallel using this function gnome-terminal -e sh -c "python scraper.py". I would like to know if there's a way to wait until each ...
0
votes
0answers
26 views

Installing specific version of python and its dependencies in chroot enviroment

I'm trying to install python from source on chroot environment in CentOS 7.1, If I'm using ./configure --prefix=/chroot but I need to find the dependencies and copy them to chroot directory also, How ...
0
votes
1answer
30 views

Unknown media type error while installing

I'm trying to install gmate on fedora 23 First, it require some packages: pywebkitgtk, python-sexy, python-inotify and ack Installing them without any problems: [root@host gmate] # dnf install ...
0
votes
1answer
48 views

Centos 5.11 No module named yum [closed]

I'm running Centos 5.11 and I installed python 2.7 (replacing 2.4) I soon found out that yum won't work with 2.7, as expected if I put python -V it shows Python 2.7. My classmate did a snapshot of ...
0
votes
0answers
561 views

Upgrading python to 2.7.11 on Ubuntu 14.04

I've been trying to upgrade my python to 2.7.11 or 3.4 (the latest one) but I'm having doing so. I followed the guide here: Upgrade to Python 2.7.11 on Ubuntu 14.04 LTS Everything completes fine but ...
1
vote
0answers
53 views

Running Python application on boot through init.d script

I am trying to start an Python application on a Debian based OS that is running on a router. This application comes prebundled with site-packages and a python binary. Like a virtual environment. The ...
-1
votes
1answer
38 views

Need some support on Python for string append/replacement

I am writing a python script to replace/append certain strings with their equivalents.. Actual string: Name = "com.icon.t2p" Object = "/com/icon/t2p/host" Expected Output : Name = "com.icon....
0
votes
1answer
35 views

Which is more expensive, shell command or manipulating file in python?

docker ps which gives the LIST of running dockers with <ID> <name> <port> etc. We can get the same info in /var/lib/docker/containers/<ID>/config.json. (Here ID is same in ...
0
votes
2answers
29 views

placing words corresponding to a key in a singe row

I have a symbol table of the form (key-value pairs) 01 aaluu desii 01 aaluu cipsa 01 amaruuda ilaahabaadii 02 hai 02 nahii 02 txamaatxara To start with, I am supposed to place words(...
0
votes
1answer
70 views

Jenkins, Python and root

I am trying to run Python unittest as part of a Jenkins build. My build was failing as follows: + export PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/var/lib/jenkins/jobs/...