Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
1
vote
3answers
33 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
0answers
7 views
Cannot install pyzmq
I'm trying to install pyzmq on my Elementary OS netbook as it is a dependency for ipython notebook. The full report is at github as exceeds the stackexchange character limit. Here are the last few ...
0
votes
0answers
19 views
How to sync Google Calendar gcalcli with Conky/Desktop?
Main Question: As the title says, I want to sync my Google Calendar with the Linux Mint 17.2 desktop; preferably through Conky. I'm aware of a method using Thunderbird but I'd rather have it set up as ...
1
vote
1answer
15 views
How to install cctrlapp on debian?
I try to install the cctrl command line client on a debian 8 machine.
Following the install instructions, I installed python, pip and then (via pip) cctrl
apt-get install python
apt-get install ...
0
votes
1answer
22 views
How do I create a deb package for a python progarm?
I created a python game that I want to distribute on my website via a Debian package. The game has a few dependence that are usually not installed (such as pygame) on some linux computers, but often ...
0
votes
0answers
53 views
Capture user input in SSH
Say you are at work, you ssh to your home PC and opened a python game.py. No VNC. Is it possible to press down and up, space, etc. inside the window of the game? No need to see the actual game ...
0
votes
0answers
57 views
Script won't run in cron but runs fine in root shell
My Problem: I have a python script that runs fine when run manually but does not complete when run using cron. My script fails in cron because it contains pexpect commands that require an interactive ...
0
votes
2answers
23 views
How to install PyX correctly for Scappy use? [closed]
When I try to run Scappy interactive shell I am faced with this:
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump()
(The shell is working but of course I can not use the above ^ :(
...
0
votes
1answer
26 views
Offlineimap unknown SSL protocol error
I am using offlineimap to fetch mail from several IMAP servers. This used to work but today offlineimap has been unable to fetch mail, producing the following errors:
*** Processing account example
...
0
votes
0answers
19 views
Upgrade python from 2.4 to 2.6 on RHEL 5.7
Currently We have 2.4.3-56.el5 version of python installed on RHEL 5.7. Need to install nodejs for which the python version should be upgraded to python26. I have downloaded the below rpms:
...
0
votes
0answers
25 views
How to execute python script on Visual studio / Other Editor with Linux environment
as all know it is impossible to write long python script directly on Linux machine with vi editor
so we use (win editor) tools as visual studio / Pycharm and so on ....
so my question is how to ...
0
votes
0answers
32 views
Continuum Anaconda Fedora 22 Linux path
After an update to Windows 10 I encounter problems in my dual boot system so I had to re-install Fedora 22.
So, starting with a fresh system I re-installed my work environment. The one installation ...
0
votes
0answers
23 views
Continuum Anaconda Fedora 22 path
After an update to Windows 10 caused problems in my dual boot system I had to reinstall Fedora 22. So, starting with a fresh system I reinstalled my work environment. The one installation that has ...
1
vote
1answer
22 views
How to add entry for bootable external drive partition to internal bootloader?
I created a bootable partion on a Toshiba Canvio 2 for LinuxMint, leaving one other partition of same size for possibly another install in the future and the rest of the drive is for storage and back ...
2
votes
2answers
210 views
Using Python and Scapy to sniff for ARP on Pi
I'm trying to use a Raspberry Pi to find ARP requests from a specific wireless device on my network. It's one of those Amazon dash buttons. Someone used this code to listen to when the dash connects ...
0
votes
1answer
38 views
How to build openssl with clang(rather than gcc) on a FreeBSD machine?
I have a 64 bit FreeBSD build machine. I need to add https support in my python3 application code. For that it is advised to build/compile python with openssl support. I do not need any gcc dependency ...
1
vote
2answers
41 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, ...
0
votes
0answers
18 views
How do I circumvent or gain root priviliges for pacman with PyDev?
I have downloaded and forked a project that I like to tinker with in Eclipse using PyDev. However, this project makes use of the package manager pacman that installs and uninstalls packages and needs ...
-1
votes
2answers
35 views
Loop over columns and store values to associative arrays
I've got a text file containing two columns, like so:
26 0.000342231
27 0.000342231
28 0.000684463
29 0.00136893
30 0.00102669
31 0.00308008
32 0.00308008
33 0.00444901
34 0.00718686
35 0.00718686
36 ...
-2
votes
0answers
27 views
Help with creating temperature humidity script [migrated]
I am a completely inexperienced A level student trying to get to grips with python to complete an assignment. I have been given a week to complete it- I have very little knowledge of what to do and ...
1
vote
1answer
26 views
Python processes appearing and disappearing in top
I concurrently launched around 12 Python scripts on a 24-core server (Ubuntu 14.04 LTS x64). Each of Python script takes around one hour to complete.
I see in top that they appear quite sporadically, ...
2
votes
1answer
54 views
Restrict user script execution
I have a game engine running on a Debian server. The game involves bots, which are coded in Python by the players.
A player write a bot in Python
Upon validation, the code is sent to the server
A ...
0
votes
0answers
20 views
I want to recompile a package with python3
I need to recompile a package on slackware using python3 instead python2.7
I have tried to set a link python3->python but doesn't work.
This is the slackbuild wich i use
0
votes
2answers
53 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 greater than 65.
#!/usr/bin/python
import pexpect
sshCmd='ssh [email protected]'
prompt='[root@user ~]#'
...
0
votes
0answers
30 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
12 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 ...
1
vote
1answer
31 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
42 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
13 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 ...
2
votes
1answer
135 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
40 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
37 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
74 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
114 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
42 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
44 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
25 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
2answers
111 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
21 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
30 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
26 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
42 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
101 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
26 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
404 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
24 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
83 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
43 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
48 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
27 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
...