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

learn more… | top users | synonyms

-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
23 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 ...
0
votes
1answer
1k views

Debian Stable (“wheezy”): was trying to build Python 3.4, and I ran sudo make install — am I in trouble now?

So, I wanted to run Python 3.4.x inside a virtualenv virtual environment. I learned that the first step should be to build Python 3.4.x. I was doing so in /usr/bin/Python3.4.x (a folder I created), ...
1
vote
1answer
48 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 ...
2
votes
3answers
331 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 ...
2
votes
2answers
2k views

Can't import wx even after installing python-wxgtk2.8

I am running Linux Ubuntu 14.04 LTS and am trying to install wxPython so I can develop GUIs on python. I have python 2.7 and 3 installed but 2.7 in default. I have installed wxPython as recommended ...
0
votes
0answers
30 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 ...
0
votes
1answer
1k views

qmake error when installing PyQt5

I'm trying to install PyQt5 for python3 from source files. I install SIP correctly. Then when I want to prepare the make file for installing PyQt, I get this error: #python3 configure.py Error: ...
3
votes
3answers
53 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 ...
2
votes
2answers
348 views

csvkit Permission denied

I am on Mac and installed csvkit. When I run csvlook, I get a traceback with the following error message: IOError: [Errno 13] Permission denied: '/Library ...
9
votes
5answers
3k views

How do I get 'realpath' to find my symbolic link?

I am on MacOSX using bash as my shell. I have symbolic link, created like this: ln -s /usr/bin/python python2 I have a package that uses python2 and I want to create a symbol link in my current ...
0
votes
0answers
32 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
vote
1answer
6k views

Software Center not opening in Linux Mint

I'm a Linux Mint 14 user. I'm not able to open the software center. $ software-center ERROR:root:DebFileApplication import Traceback (most recent call last): File ...
-1
votes
3answers
70 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
31 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
22 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
23 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 ...
1
vote
4answers
2k views

piping python variable value to bash script (inside python script)

After years of bash scripting I've been given the task of modifying a python script to have it call a shell script when certain conditions are met. That part wasn't too bad, but now I'm trying to ...
0
votes
1answer
32 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 ...
2
votes
1answer
2k views

Trouble installing lxml with custom install location for libxml2/libxslt

I am attempting to install a python module called lxml to my account on a supercomputer running RHEL. I do NOT have root access or super user status. lxml requires the dev/devel versions of libxml2 ...
0
votes
0answers
142 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 ...
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
52 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
31 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
30 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
28 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 ...
1
vote
0answers
29 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
34 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
41 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 ...
1
vote
2answers
3k views

“except (IOError, OSError), e: SyntaxError: invalid syntax” when configuring python-lockfile

I am having trouble installing any new packages in Ubuntu because of python. I tried sudo apt-get install python3 python3-dev but I am getting the following output :: dpkg: error processing ...
0
votes
2answers
25 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
2answers
34 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
21 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 ...
2
votes
1answer
192 views

installing dsc30 - python 2.6 fights back

Im trying to upgrade some systems to Cassandra 3.x. The installer want Python(abi) >= 2.7 so I installed it. Still seeing this error: Resolving Dependencies --> Running transaction check ---> ...
1
vote
1answer
41 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 ...
0
votes
2answers
73 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 ...
0
votes
3answers
798 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 ...
0
votes
0answers
52 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 ...
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 ...
3
votes
1answer
61 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 ...
3
votes
2answers
185 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 ...
4
votes
1answer
331 views

is there a way to get the url from current tab in google-chrome?

I used to do that on firefox using a python command, but recently something changed and I can't get the URL anymore! What used to work with firefox: #!/bin/bash current_tab_num () { python2 ...
1
vote
2answers
114 views

Using embedded python script in Makefile

I'm trying to run a Python snippet inside a Make target, but I'm having trouble trying to figure out how these things work in Make. Here is my attempt so far: define BROWSER_PYSCRIPT import os, ...
8
votes
2answers
35k views

Running Python on ChromeOS

Is it possible to run the Python interpreter on a ChromeOS machine? I've found various editors you can use, but I would like the ability to run python applications as well. I would like to purchase ...
2
votes
2answers
2k 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 ...
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 ...
3
votes
4answers
574 views

How can I disable the new history feature in Python 3.4?

Since upgrading to Python 3.4, all interactive commands are logged to ~/.python_history. I don't want Python to create or write to this file. Creating a symlink to /dev/null does not work, Python ...
2
votes
3answers
1k views

installing eric5 in CentOS 6.4

I am trying to install Eric Python IDE 5 in my CentOS 6.4. The problem here is even I have installed PyQT4 its again saying that module is missing. what I am supposed to do ? here is the terminal log ...
1
vote
1answer
74 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
49 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 ...