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

learn more… | top users | synonyms

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 ...
1
vote
1answer
79 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
138 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
30 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
60 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
63 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
40 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
81 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
43 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
24 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
27 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
35 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
275 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
44 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
36 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 = ...
0
votes
1answer
32 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 ...
0
votes
1answer
64 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 ...
1
vote
0answers
36 views

how to find default SMTP server name?

I have a python script which uses smtplib to send out an email. I am not sure what to use for mail server name in the smtplib.SMTP initialization. On my test server I use the below and it works fine. ...
0
votes
3answers
39 views

Extract Strings from Web Log file

Given a file containing web access logs for a YouTube video, every line is a hit and is in the format. 62.172.72.131 - - [02/Jan/2003:02:06:41 -0700] "GET /random/html/riaa_hacked/ HTTP/1.0" 200 ...
1
vote
0answers
47 views

Python installation fails in chroot

I tried to install Miniconda Python in a chroot: chroot $1 wget -q https://repo.continuum.io/miniconda/Miniconda3-3.19.0-Linux-x86_64.sh -O /tmp/miniconda.sh ...
0
votes
2answers
30 views

Program run from udev cannot open a window [duplicate]

I have a script, written in python: #!/usr/bin/python3 from tkinter import messagebox variable = messagebox.showinfo('title', 'question') This python script does nothing else than showing a message ...
1
vote
3answers
53 views

Program cannot resolve host name if it's started before first successful internet connection

This is related to a stackoverflow post I posted. Basically I have a Python script that I'm running on an embedded system (Buildroot-based). The python script runs on startup, but I cannot guarantee ...
1
vote
1answer
26 views

Set maximum number of processes started by incrond

I am using incrond to monitor a directory for incoming files. After each file arrives in the directory a python script is called to process it. A problem arises when the rate of incoming files is ...
0
votes
0answers
73 views

uwsgi , application not found

Ok so I have been trying to find a solution to this for 2 days now but I cannot seem to make much progress. I am running this on a nginx server but that appears to be fine. I copied over a python ...
1
vote
1answer
53 views

ImportError: No module named '_struct' when installing setuptools

I've installed separate Python versions on Centos 6.7 using the instructions listed here, using a local install (not my package manager). When I tried to install [setuptools][2] (e.g. python3.5 ...
3
votes
1answer
69 views

Permission denied error without ssh connection

I have an Ubuntu 12.04 server which runs a python application. The application is started manually in tmux or automatically when the server starts. Application processes http requests from android ...
19
votes
5answers
3k views

Why is there an EOF in the middle of the arguments?

I wanted to write a little bash function such that I can tell bash, import os or from sys import stdout and it will spawn a new Python interpreter with the module imported. The latter from function ...
0
votes
3answers
981 views

Getting Error updating CentOS 6.7

I am trying to update CentOS and getting errors as follows. I tried to remove Python and I couldn't. [root@csc ~]# cat /etc/issue CentOS release 6.7 (Final) Kernel \r on an \m Error updating ...
3
votes
2answers
215 views

echo $PATH shows path to python scripts, but they cannot be executed

I am new to using the shell, and wanted to create a directory in $HOME where I can put all my python scripts, set a path to that directory, so that I can go into any folder on my Mac and execute those ...
0
votes
2answers
95 views

CentOS 6, having hard time with yum, repos and installing packages

I'm having some hard time with yum and hoped to get some help. My end goal is to install the pymssql library for Python. It fails because it needs freetds install. yum install freetds fails with ...
1
vote
0answers
10 views

trying to get fbpanel installed but getting confusing errors

I'm not too keen on these python errors to figure them out. this is the error I am getting, but I'm using alsa/pulseaudio so I have no idea how to read python errors. %mike@voidz ...
1
vote
1answer
95 views

How do you list number of lines of every file in a directory in human readable format.

I have a list of directories and subdirectories that contain large csv files. There are about 500 million lines in these files, each is a record. I would like to know How many lines are in each ...
0
votes
2answers
50 views

Need help in data arrangement

Could you please help me to sort this out, I have data which i would like get output in below format using shell/perl script. Data: Virtual Machine Test status Running. Assigned Server ...
0
votes
0answers
57 views

Equivalent to OS X's py2app and Windows's py2exe?

I'm writing an application in Python. I don't expect my end users to be particularly tech-savvy, so I'd like to package it up like a familiar native executable. For OS X, that means running it ...
1
vote
0answers
41 views

Build xpra on local directory without root priviledges

I am trying to build xpra on local directory without root priviledges. The xpra official site says: https://www.xpra.org/trac/wiki/Building Building with distutils For installing into a local ...
1
vote
0answers
41 views

Can I copy output from sage to my clipboard?

I run sage from the terminal. One nice feature of sage is that it can automatically latex-ify results. I would like to be able to pipe these results to my clipboard (I run Ubuntu 14.04). I have ...
1
vote
0answers
21 views

Can I change owner of a tunnel after creating it?

I've been trying to finagle pytun to do my bidding in creating persistent ssh tunnels, but I very much do not want these to be owned by root and unless I modify the python package myself (which as a ...
0
votes
0answers
194 views

FreeBSD Selenium PhantomJS - Can not connect to the Service

i am stuck to run PhantomJS with selenium. So i have prepared a FreeBSD Jail and installed phantomjs via ports. whereis phantomjs > phantomjs: /usr/local/bin/phantomjs /usr/ports/lang/phantomjs ...
0
votes
2answers
130 views

Script for ssh automatic login to a specific port

So currently, the "traditional" way to connect through SSH is the following one: ssh USERNAME@HOST -p PORT I would like to create a script in which I will include all the appropriate information ...
3
votes
1answer
79 views

Bulk downloading PDFs

This may/may not be possible using bash happy for a suggestion in Python if there is one. But I would like to download all the PDFs/ePubs from the following link https://mises.org/library/books ...
0
votes
0answers
53 views

wget changes downloaded file size

I'm using wget to download Excel file with xlsx extension. The thing is that when I want to deal with the file using openpyxl, I get the following error: "BadZipfile: File is not a zip file" But when ...
0
votes
0answers
119 views

Email generated with Python stuck in mailq, times out (Debian)

I want to send emails out, originating from my Debian computer. I do NOT want the emails to originate from my gmail account, like in most Python smtplib examples. I called my ISP regarding port 25, ...
0
votes
1answer
111 views

How do I print the data received on a serial port?

Below is the python code I have written : import serial,time #initialization and open the port ser = serial.Serial() ser.port = "/dev/ttyUSB0" ser.baudrate = 1152000 ser.bytesize = serial.EIGHTBITS ...
0
votes
0answers
41 views

Cronjob python script

I have a python script that parses some html and then writes it to output file. I want that cronjob would execute that python script. When I run this script from command line it works fine (python ...
0
votes
1answer
111 views

OPENSSL_1.0.0 not found when running PyPy 4.0.1 on Amazon Linux (AWS EC2)

I want to run PyPy 4.0.1 on Amazon Linux (AWS EC2), and then downloaded and unzipped the tar.bz file. Also, I created the symbolic links to fix problems, such as pypy: error while loading shared ...
3
votes
0answers
56 views

What is wrong with my systemd unit file?

Here is my unit file: [Unit] Description=Backend Service After=mariadb.service Requires=mariadb.service [Service] Type=simple ExecStart=/var/www/html/pythonscripts/Backend.py [Install] Alias=BEd ...
1
vote
1answer
41 views

How to Load data to one table from Multiple excel files?

I have to load data from multiple excel file into one table , Please help me to achieve the solution. We are getting excel file from different retail shop which contain multiple column , each file is ...
1
vote
2answers
147 views

How to specify the python path for pip?

With pip installed, I am trying to install matplotlib in Ubuntu 12.04.4 LTS. I got the following error when executing "sudo pip install matplotlib" I guess this is because the python version is too ...