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

learn more… | top users | synonyms

0
votes
1answer
11 views

pexpect fails to match command is grater than 65 characters

Issue with pexpect , python. Pexepect fails to do expect, If the length of the command is graterthan 65. !/usr/bin/python import pexpect sshCmd='ssh root@15.186.22.105' prompt='[root@user ~]#' ...
0
votes
0answers
10 views

Install previous version of iceweasel (raspberry Pi)

I am trying to get selenium (python) working on the raspberry pi. I am using iceweasel for lack of another browser, but there is some bug im not sure about in the current version that stops selenium ...
0
votes
0answers
11 views

Zenoss pythonThresholdException error

Zenoss query here, first things first: I have a CentOS 5.6 virtual server hosting Zenoss 4.2.5 and I am experienced no compatibility issues with this so far - it does everything I need. The problem ...
0
votes
0answers
20 views

problem in extracting fasta sequence based on header name [on hold]

I'm facing a crazy problem during extracting fasta sequence based on their header name. I have a fasta sequence file and a text file containing their header name. I tried to extract sequence of ...
1
vote
1answer
27 views

Runnig python script, error appears

https://github.com/g-oikonomou/sensniff/blob/master/host/sensniff.py The link above refers to a python script that is to be ran on Ubuntu. When I run the script, the following error appears on the ...
0
votes
1answer
28 views

How do I make a python daemon run at bootup?

I am writing a Python program that will act as a custom converter for a hardware application for me on the raspberry pi. I have written python code to act as a daemon, but how do I go about making it ...
0
votes
0answers
10 views

LSF bsub implimentation of LUT

We have an implementation of LSF (bsub) on our HPC system. I want to run a model several times with various input parameters. I will have a table either csv or other format with the required ...
-1
votes
0answers
32 views

Python, C or C++ for Linux admin [closed]

First of all this is the first time for me to ask a question and I'm not sure exactly if its in the right place as I can't find a place for what I've, if it's not the right place then please guide me ...
2
votes
1answer
42 views

Help me repair my python - I think dpkg has to be reset (very tricky issue)

first question in Unix & Linux - I really hope, someone can help... Summary (TL;DR) On my Kubuntu 14.4 (which has python 2.7.6 as standard) my python is broken after I tried to install python ...
1
vote
1answer
22 views

Warnings when opening programs via Python subprocess calls

I am attempting to open an image and a text file that my Python (3.3.2) program is creating (the files are created without issue). The last two lines of the program are: subprocess.call(['leafpad', ...
5
votes
1answer
19 views

Running Deamon Involving GPIO on Pi

I have a deamon that monitors various things using the GPIO ports. I have used python to write the code for this using the RPi.GPIO module. I would like to ensure that the deamon is always running, ...
1
vote
1answer
71 views

Can I execute a script before every login

I am planning to have a program that will need to connect to a server. I'd like to be able to send a encrypted password to my server. The thing is, I need my decrypting script to be executed ...
0
votes
2answers
45 views

Python 2.7.10 on centos 6.6 but no IDLE

I installed Python 2.7.10 on my Centos 6.6 32 bit laptop but when I type IDLE at the prompt I get this [sinux1@horriblehost ~]$ idle ** IDLE can't import Tkinter. Your Python may not be configured ...
0
votes
0answers
20 views

Why won't MOTD display output from a Python script it calls outside of /etc/update-motd.d/ unless it's in this directory?

The Situation We're running a headless Ubuntu 14.10 Server to fulfill various needs and tests. I was experimenting with changing the MOTD for SSH sessions via /etc/update-motd.d/ so as to display ...
0
votes
1answer
35 views

syntax error while tring to execute python program in bash shell

I'm trying to use python to read in data from a text file but I keep getting "syntax" errors when I execute the program. Python Code: Test.py import os import numpy as np Ye,Eb,Tb = ...
0
votes
1answer
21 views

Python feature disabled vim-nox

I have installed vim-nox version 7.4 package in my Debian Wheezy machine from backports. I am confused that the python feature still does not work as shown from vim --version command as -python as ...
-3
votes
3answers
67 views

Installing python on CentOS

I am unable to digest the fact that Linux CentOS requires users to do so much just for installing Python. It was so easy installing python on Ubuntu. Also since CentOS comes with python2.5 it leads ...
2
votes
0answers
18 views

One liner to enable some SCLs and a python virtual environment?

I'm writing a python 3.4 app on a centos box. Normally, when I have to reset my tmux session, such as after a reboot I do the following: [zippy@localhost ~]$ scl enable rh-python34 httpd24 bash ...
0
votes
1answer
26 views

How do I make a Make, Make Install, and deb file for a python program?

I recently got done making a python program. Now the question is, how do I go about making an installation script for it. From my understanding you need to create a make file, but from what my ...
-1
votes
1answer
25 views

Stat with Python about line count of 2-bits [closed]

Pseudocode to get amount of lines for 2-bit system (2*30=60): python -c "from math import ceil; print ceil(`stat --printf="%s/30"`/500.0)"; but I would like to really run similar stat command ...
0
votes
1answer
35 views

python && unix permissions (gitlab) [closed]

I have directory /home/git/repositories with rights 770 and uid=git,gid=git user1@gitserver:~$ ls -la /home/git/ | grep repo drwxrws--- 42 git git 4096 Jun 30 17:02 repositories I have user ...
1
vote
2answers
91 views

how to replace a sed/perl expression (change and print only matched line) with a python expression?

I have asked this question to learn how perl could replace sed. Now I want to know how the following commands (which do the same thing) would look like for python: sed -n ...
1
vote
1answer
24 views

How do I prevent the Keyboard Interrupt from being sent through the Screen program

I am making a python program, whose output (not input) can be viewed via the screen program. However, the problem is that doing this allows the user to turn off the program via the Keyboard Interrupt ...
3
votes
4answers
375 views

How can I make a bash script that determines if a program is already running

There is a python program I am making, and I am planning to have it launch via a bash script. However the program acts badly when the computer tries to launch it twice. Since I really only need this ...
0
votes
0answers
14 views

How to automate HP 3PAR in CentOS using Python?

I have worked out in windows to start 3PAR using python but i am not able to login into 3PAR in centos. Additionally how to view system,hosts, provisioning Tab(list Volumes, Virtual Volume sets, ...
0
votes
2answers
54 views

root access on new chromeos lenovo n21 for python dev

We've purchased several new Lenovo N21 chrombooks to run Python workshops for inmates in the local jail. Trying to install Crouton, Debian, and Anaconda to prepare. All require developer mode and ...
1
vote
1answer
30 views

Compiling Python 2.7.10 Error

I want to add Python 2.7 to my Unix. I downloaded the sources to the VirtualBox on which the Unix is installed and run ./configure --prefix=/usr \ --enable-shared \ ...
1
vote
0answers
8 views

How to write lists as a file attribute using PyGTK [migrated]

A comment by the Linux Mint founder stated that file emblems in newer versions of Nemo can be programatically accessed, as seen in the following example using Python and PyGTK: import gio file = ...
1
vote
0answers
20 views

Python - Is it possible to have a dictionary in a list? [migrated]

I'y new to writing scripts in Python but I know you can have a list inside a dictionary but can you have a dictionary inside a list? My example is i'm trying to execute a script on a list of linux ...
1
vote
0answers
30 views

Is it possible to execute python script on Visual studio with Linux environment

Is it possible to execute python script on Visual studio with Linux environment For example The following python code was written on the visual studio import os f = os.popen('date') now = ...
0
votes
0answers
20 views

RewriteRule ^/(.*) http://127.0.0.1:5050/$1 [L,P]

What is the full meaning of following line - RewriteRule ^/(.*) http://127.0.0.1:5050/$1 [L,P] There are three application both running by python on ubuntu 14.4. they are visible as below link ...
0
votes
1answer
12 views

Unable to start Terminator in Fedora

I'm not Unix friendly user so my question could be very dummy. I installed Terminator using this command: sudo dnf install terminator After someday of using without problem, For some reason, today ...
0
votes
0answers
19 views

ImportError: No module named gtkmozembed (Fedora)

I am trying to run this python script https://github.com/coderholic/PyWebShot but I am using Fedora (20) and I do not know how to get module gtkmozembed. Yum provides and yum search do not help me. ...
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
3answers
38 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
30 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
46 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
74 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
144 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
91 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
2answers
79 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
68 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
60 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
56 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
17 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
33 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
230 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
23 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 ...
2
votes
1answer
26 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
32 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 ...