Tagged Questions
0
votes
0answers
8 views
gmate error - no module named gconf when trying to open gmate
When trying to open gmate editor (installed it for ruby), i get this error:
"ImportError: no module named gconf"
my python version is 2.7.3
0
votes
2answers
24 views
os.system('sudo shutdown now -P') doesn't work with cloud-init
I want to launch an Amazon EC2 instance programmatically, use cloud-init to execute a Python script, then have this same script terminate the instance. Everything works fine, except for the ...
1
vote
1answer
34 views
Python Script for Raspberry Pi not running properly
im having a little trouble with a python script that I wrote the other day. This script is for my rasbperry pi that has a digital interface attached to the GPIO pins. The purpose of this script is to ...
0
votes
0answers
14 views
Installing Tkinter on Python 2.6.6 Red Hat 4.4.5-6 [on hold]
I'm using Python 2.6.6 using GCC 4.4.5 20110214 (Red Hat 4.4.5-6) on linux2 and looking for a way to install Tkinter. Thanks for the help in advance.
0
votes
1answer
26 views
Signal handling in python-daemon
I installed python-daemon and now I'm trying to get the signal handling right. My code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import signal, time, syslog
import daemon
def runDaemon():
...
0
votes
1answer
31 views
Installing 'lxml' in Amazon EC2
I am having trouble installing lxml in Amazon EC2. I am having a Linux instance. I entered the following command.
sudo pip install lxml
Right now, it is not working. It just generate the following ...
0
votes
2answers
28 views
Curl Equivalent in Python
I have a python program that takes pictures and I am wondering how I would write a program that sends those pictures to a particular URL.
If it matters, I am running this on a Raspberry Pi.
(Please ...
1
vote
2answers
30 views
Is it possible to get current application running with python script
I am very much concerned about my productivity all the time. I have recently come across this beautiful chrome extension Limitless
But this is only measuring what i'm doing within the chrome ...
0
votes
1answer
23 views
Pyinstaller - Exclude files from final executable
I am developing an cross platform application which ships additional binary files from source directory for linux and windows. Right now I am using following script in my *.spec file to include all ...
0
votes
0answers
7 views
installing virutalenvwrapper in Python2.7 in centos
I have 2 versions of Python in centos linux system - Python2.6 and Python2.7..
Now I need to install virtualenvwrapper in Python2.7 but I dont see it being installed,
[root@linuxhost bin]# ...
0
votes
3answers
47 views
Shebang line for Python 2.7
I have installed Python2.7 in my Linux Centos which comes with a default Python2.6 installation,
Default Python
[root@linuxhost PythonProjects]# python -V
Python 2.6.6
Default Python2.7
...
4
votes
2answers
73 views
Learning python for security, having trouble with su
Preface: I am fully aware that this could be illegal if not on a test machine. I am doing this as a learning exercise for learning python for security and penetration testing. This will ONLY be done ...
-1
votes
1answer
39 views
How can i add the current revision number on website page without editing main files
I have the issue that when I log issues against the website developed by coders on the test website then they are not sure which revision I am currently on.
Now I don't want to make any code change ...
0
votes
2answers
36 views
how to open a html page in linux like opening in windows browser?
I have one html page whose name is temp.html, and it likes:
<div class="file_div1" style="border-top:none; margin-top:0">
<div class="file_div1_1">
<script ...
1
vote
0answers
20 views
Nautilus, Ask for confirmation when moving files
I need Nautilus to ask for confirmation when moving files from one folder to another. Is it possible to set this up?
I guess I need something that listens to moves.
0
votes
1answer
49 views
Python script in linux
okay so im trying to take my ssh key and push it to my root's authorized key list so this is why ive tried with many different variations. keep in mind im new to python:
import subprocess
f = ...
0
votes
1answer
22 views
Installing mysqldb with a new version of python on linux
I have mysqldb installed and it works for python2.4. But I've recently installed python2.6 and when I run it I can't import mysqldb. I get the following:
import MySQLdb
ImportError: No module named ...
0
votes
0answers
21 views
Fetch excel formula components using python in *nixes [duplicate]
I have .xlsx doculment - in microsoft excel format, with formula (sum) in one of its cells. I need to know which cells this formula depends on. How i can do this? I found that maybe xlrd module can ...
0
votes
1answer
20 views
Calling to restart a “service” in Linux from Python script not working from within crontab entry
I have the following python test script (extracted from a much bigger .py file) which I'm trying to get working on an EC2 instance (haproxy OpsWorks instance).
There seems to be a major difference ...
0
votes
0answers
31 views
How to find and manipulate a users home folders in python?
Say I had a program that identified what commonly used home folders were in use in a users home directory, and then allowed the user to remove and create home directories as he pleased.
This could be ...
0
votes
0answers
29 views
Is it possible to disable email in django app on localhost
I have the django app where i am sending emails in functions
from django.core.mail import send_mail
send_mail(settings.EMAIL_SUBJECT_PREFIX + SUBMIT_SUBJECT, SUBMIT_MSG, settings.DEFAULT_FROM_EMAIL, ...
1
vote
1answer
55 views
How can I use Vim for Python programming? (Beginner programmer) [on hold]
Okay so I am a noob programmer and am just starting out with Python, I am trying to use Vim, but I am unsure if for one a python extension is installed in the editor, and how to build .py apps, This ...
2
votes
0answers
28 views
VTK works with real X, crashes with Xvfb
I'm debugging a 3rd party Python script that implements headless image processing with the VTK library. When run with a regular X window session, it works as expected, flashing a window for a split ...
0
votes
0answers
27 views
How to make vms in a cluster to ssh each other without password?
I have a bunch of virtual machines running ubuntu. I wish to run mpi code on them. I need a script to make vms ssh each other without password given a list of IPs and a username and a password that ...
-3
votes
0answers
20 views
How to develop a ubuntu/xfce panel plugin? [closed]
I wanna develop a plugin for xfce4 panel.
This plugin is simply a python script which using urllib2 library to get some data from website,
and display some text on the panel.
How to ?
Is there any ...
0
votes
0answers
12 views
Automating connecting to lxc container and executing commands inside the container
Hi I am trying to automate lxc container creation/starting/stopping and executing commands inside them via script (Bash/Python). I was able to create a container which is a very simple step
...
1
vote
1answer
55 views
How can I change the default version on Python on linux in order to install and use certain modules?
I am using Linux Mint Nadia and have both Python 3.2.3 and Python 2.7.3 installed. I access each using IDLE and have some modules that only work on 1 version. I think the default version is 2.7.3 ...
2
votes
0answers
54 views
Reading unformatted fortran file with numpy fromfile in mac osx intel and linux AMD produces different data
I have a fortran code which produces unformatted files. I wrote a script in python to plot some quantities, and I use the numpy fromfile routine to read the data from the file. In my laptop, which is ...
0
votes
0answers
25 views
xgoogle module work in idle but not in shell [closed]
I recently moved from windows to linux and I trying to install xgoogle in ubuntu.
I am just a beginner with linux and command line so I follow up the installer in python X install.
But its seem that ...
1
vote
0answers
46 views
Any concerns with using Python for embedded Linux? [closed]
What are some concerns associated with using Python on an embedded platform?
What would be a minimum hardware spec recommended before seriously considering using a full implementation of Python on a ...
1
vote
1answer
33 views
export in bash with printf doen't work
I exported:
export FMTSTR="%2\$n'printf "\xc0\xf2\x03\x42";'"
and I want to see the result:
env | grep FMTSTR
FMTSTR=%2$n'printf xc0xf2x03x42;'
but this is not what I want...The result must be :
...
0
votes
2answers
53 views
virtualenv AssertionError with Red Hat Enterprise Linux Server release 6.3
I am using RHEL 6.3 and have 2.6.6. I need to use the Python 2.7.6. I compiled python from source, installed pip and virtual env.
Now I am trying in different ways:
virtualenv-2.7 testvirtualenv
...
0
votes
1answer
61 views
Python subprocess command execution got stuck
I have an issue where a unix command executed with the python subprocess module is stuck:
(The full code is here:
https://github.com/discoproject/disco/blob/master/lib/disco/worker/classic/func.py)
...
2
votes
2answers
58 views
Portable .so library for Linux
I am writing a Python app that works with graphics and depends on PySDL2 library. PySDL2 depends on compiled SDL2 binary library that can be downloaded from SDL site. I wrote a bootstrap script to ...
0
votes
1answer
12 views
Pythonbrew can't build python 2.6
I've tried to install python from pythonbrew as the tutorial for SublimeClang told me. I've executed the command sudo ./pythonbrew install --configure="--enable-unicode=ucs4" 2.6 (tried both with and ...
-3
votes
0answers
51 views
how to create a password protected folder in linux by using python with out any encryption [closed]
how to create a password protected folder/file in Linux by using python with out any encryption mechanisms please help me with this
I want to create a folder with password protection in Linux
(when ...
1
vote
1answer
40 views
Check file exists on different servers remotely
I need to check the existence of some files on different servers remotely. The servers are in Linux and AIX.
I tried python telnet and the linux shell behave differently at login so I need to use ...
-3
votes
0answers
36 views
MIDI light organ on the raspberry pi
i recently got myself an ableton push and as I have a spare raspberry pi and a few leds, I thought of building / programming a light organ which i can control wirelessly from my Ableton setup on my ...
1
vote
2answers
50 views
building matplotlib from source on fedora 19, and found no freetype header files
i had installed matplotlib source package on a fedora 19 system, and got the following information:
============================================================================
Edit setup.cfg to ...
0
votes
1answer
51 views
Python Installation Kali Linux
I am running Kali Linux off a USB, and its native Python (version 2.7.3) seems to me pretty messed up (as in, it says "try:" is a syntax error). So I am trying to install Python 3.2, which is the ...
0
votes
0answers
47 views
Hosting Python web applications (May be with Amazon?)
I am new to this Amazon web services. I have a web application with python back end, and it has the following instructions. I have no knowledge of Python as well.
Read me.txt
Steps:
There are two ...
2
votes
1answer
28 views
python SyntaxError when used as an argument [closed]
I am new in python and I want to debug my vulnerable program written in C.
./vuln $(python -c 'print "ABCD"*7 "\xc0\xf2\x03\x42FAKE\xfa\xfe\xff\xbf"')
The error is:
File "<string>", line 1
...
0
votes
1answer
55 views
argparse - Reproduce behavior of “--help” argument with a specific argument
I have some trouble while working with the argparse module for Python v2.7.
Basically, what I have is a script that works with 5 mandatory arguments :
url
method
login
password
output
An example ...
0
votes
1answer
14 views
Passing “python2.7 -c” output as parameter for C file
Outside of a debugger, I'd like to pass through something ran in python. I can do this easily in something like GDB.
example:
./a.out python -c "print 'A'*100"
Note that this did not work:
python ...
0
votes
2answers
32 views
Why running python script causes an error in Apache
Running the following python script through web site works fine and (as expected) stops the playback of MPD:
#!/usr/bin/env python
import subprocess
subprocess.call(["mpc", "stop"])
print ...
0
votes
0answers
15 views
x11 query top-level windows and map them to application which created it (making task bar)
I want to recreate what DockBarX does but in Java. So I need to be able to query the top level windows in X11 (I can do that already) find the PID (got that too : _NET_WM_PID) but then map that to ...
0
votes
2answers
33 views
Using paramiko to execute dd command but get nothing return
I use python paramiko module to execute dd command remotely like below:
paramiko.util.log_to_file('paramiko.log')
s = paramiko.SSHClient()
s.set_missing_host_key_policy(paramiko.AutoAddPolicy())
...
0
votes
0answers
31 views
Python OSError: [Errno 2] No such file or directory - Linux
When running a bash script in my Linux server which will run a game server called 'AoS' (Ace of Spades), I get the following error:
Traceback (most recent call last):
File "./run.py", line 70, in ...
0
votes
1answer
37 views
pkg_resources.DistributionNotFound: PIL
I am trying to use the reviewcode of python/django for a git repo.
while installing the
easy_install ReviewBoard
i got the following error
Setup script exited with error: command ...
1
vote
1answer
58 views
Create bash file using python
This is parameter that i want to run:
cd ../linux-3.11/; cp arch/x86/configs/byt_32_tz_emgd_defconfig .config; make ARCH=i386 oldconfig; make ARCH=i386 -j 4
I want this to save to bash file using ...