Tagged Questions
0
votes
3answers
128 views
Is shebang always the same as the interpreter's installation directory?
Must the shebang header always match the interpreter's installation directory? If so, then why do both #!/usr/bin/python and #!/usr/local/bin/python work for me?
-1
votes
1answer
45 views
Doing regex in python [closed]
I had a directory "/pcap_test" which contains several log files. Each file has a pattern like:
Pkt: 1 (358 bytes), LIFE: 1, App: itunes (INTO), State: TERMINATED, Stack: /ETH/IP/UDP/itunes, Error: ...
2
votes
1answer
61 views
What is the source of truth for currently active tty/pts connections?
I'm looking for a simple way to determine the number of currently logged in users, using only the filesystem and basic bash functions (instead of using binaries).
The uptime binary appears to be ...
2
votes
0answers
32 views
Losing sound after installing wine 1.5 (+python 2.7)?
I have a desktop and a laptop computer. Since I wanted to run IrfanView (that works great now!), I installed wine 1.5.22, which involved installing 1 GB of dependencies. The desktop continues to work ...
1
vote
0answers
87 views
How do I satisfy the “warnings” Pinax requirement?
I'm trying to build a Pinax virtualenv. I get, on Precise Penguin with 0.7:
jonathan@ubuntu:~/Downloads/Pinax-0.7-bundle/scripts$ ./pinax-boot.py ~/virtual
New python executable in ...
3
votes
3answers
2k views
How can I upgrade pip on Ubuntu 10.04?
On Ubuntu 10.04 I've used apt-get install pip to install pip after which I installed django. Then I tried to uninstall django with pip via pip uninstall django which gives me:
pip: error: No command ...
2
votes
0answers
319 views
“Operation not supported” for setfacl inside a python script [closed]
I've programmed a script using python which logs in as root on the host machine and executes some commands. Therefore it uses ssh. I want to setup acl. If I do following commands in the command line, ...
2
votes
0answers
636 views
MySQL socket and PHP (and other languages)
Background info
I'm currently running CentOS (or Red Hat?).
uname -a gives (I edited out my domain name)
Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
6
votes
1answer
3k views
How can I start the python SimpleHTTPServer on port 80?
I am using this command on Ubuntu but it is starting on port 8080 and I don't have another server running so I'd like it to start on port 80. I saw ways that you could set up a bash script to do ...
1
vote
3answers
222 views
How to know which compiler is used to compile Python programs?
How can I know which compiler is used when I type python myapp.py in terminal?
1
vote
0answers
380 views
py3compile error - Unable to get the locale encoding
After reinstalled the python3.2, I got the error as below when call py3compile:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: ...
1
vote
2answers
565 views
using cron to run script
Hey guys, im trying to run a script using cron, im using a crontab created by the user ashtanga, in the crontab i have
*/5 * * * * /home/custom-django-projects/SiteMonitor/sender.py
in top of the ...
1
vote
1answer
284 views
How to build a python egg for a TRAC plugin?
I'd like to install a mercurial plugin for Trac. The manual provides an svn path with the source code. I need to create an "egg" from that source code. Do I need to have SVN installed in order to do ...
8
votes
2answers
631 views
View Script Over SSH?
A friend, using a remote machine, SSHed to my machine and ran the following python script:
while (1):
....print "hello world"
(this script simply prints 'hello world' continuously).
I am now ...
11
votes
5answers
3k views
Using different versions of Python
Background:
Since I develop python programs that must run on different python versions, I have installed different versions of python on my computer.
I am using FC 13 so it came with python 2.6 ...