Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python and should be asked at [Stack Overflow](http://www.stackoverflow.com).

learn more… | top users | synonyms

23
votes
7answers
94k views

Updating Python on Ubuntu system

I want to update the Python build on my Linux box, but the only way I know how to do it is uninstalling the current version and installing the new one. My system is already up to date (I updated ...
17
votes
10answers
19k views

How to install matplotlib on OS X?

I want to install matplotlib on OS X. If possible, using homebrew. I installed Python 2.7.1 using brew install python, I modified my path to use it I installed pip using brew install pip I installed ...
1
vote
2answers
868 views

Shell Script File - Pass Multiple Parameters to Interpreter

I have a Python script that I run which needs to execute under a special environment, so I would run the program like so from my working directory (~/project/src): python manage.py shell This opens ...
7
votes
2answers
3k views

cron can't read PYTHONPATH environment variables?

I have added to the PYTHONPATH on my server's .bash_profile file. However it appears that cron isn't reading from it because I am getting import errors. If I run the exact command cron calls on the ...
2
votes
1answer
181 views

Having problems install py2app 0.5.2

I am a beginner at python so please excuse me for silly comments or rookie mistakes that i make. I was trying to install py2app 0.5.2 and i hit an error: $Best match: altgraph 0.7.1 $Downloading http:...
3
votes
0answers
3k views

Python Can't Find Platform Dependent Libraries — Mac Homebrew Install

In an effort to purify my environment I have recently eliminated MacPorts and all traces therein from my Mac OS 10.6.6 box, replacing it with the hip new Homebrew (https://github.com/mxcl/homebrew). ...
2
votes
0answers
2k views

Why can't the system import modules from the Python Standard Library in Ubuntu?

Boy have I had a long day today. Like most Linux days it started out fun but then turned funny. The whole day was more or less spent reinstalling a basic Gnome Ubuntu system. Everything went ...
0
votes
1answer
237 views

easy way to install Python on Windows

The standard way to install Python on Windows seems to be run the executable and then fiddle with the environmental variables. eg see here or here. The people I deal with would be intimidated having ...
0
votes
4answers
3k views

Getting .py scripts to open up in Python's IDLE

I'm new to Python. I use Python 2.7 and I am running Windows Vista (64-bit). How do I make it when I click on .py scripts... that it opens up in IDLE so I can edit it a snap? Ya know... without having ...
9
votes
5answers
24k views

How can I open Python files in IDLE from Windows?

I'm new to Python. I use Python 2.7 and I am running Windows Vista (64-bit). How do I make it when I click on .py scripts... that it opens up in IDLE so I can edit it a snap? Ya know... without having ...
2
votes
1answer
1k views

Mac OS X: Update Python for Shell [duplicate]

Possible Duplicate: Using Python on Mac So, I see similar questions, but none of the answers work for me. I updated Python to 3.1.3 from 2.6.1. Everything works, except: When I type python ...
0
votes
2answers
813 views

List/remove files, with filenames containing string that's “more than a month ago”?

I store some data in files which follow this naming convention: /interesting/data/filename-YYYY-MM-DD-HH-MM How do I look for the ones with date in file name < now - 1 month and delete them? ...
2
votes
1answer
2k views

Desktop file for my Python script

I would like to make a .desktop file for my Python script, but so far the only thing i have is a clickable icon on my desktop! It does nothing when I click it, so im guessing there is something wrong ...
1
vote
1answer
839 views

Python version priority in OSX/UNIX PATH environment variable

I want my system to use /usr/bin/python, but it's currently using /opt/local/bin/python, which points to /usr/bin/python2.6. I tried modifying the PATH variable in my .bashrc as PATH=~/bin:$PATH ......
2
votes
1answer
380 views

What is Christmas Tree Mode in Emacs?

Reading python-mode mailing lists, I've seen something I haven't heard of in a posting: [...] I can't get all syntax highlighting to work, most particular variable highlighting. I have christmas ...
3
votes
5answers
2k views

Setting up scripts in Amazon EC2 Cloud

I am currently running a few perl and python scripts on a windows pc and would like to port over to the Amazon EC2 servers running 64-bit LINUX. The scripts are basic web scrapers that go to a ...
4
votes
3answers
1k views

Using Python on Mac

I want to learn Python using my Mac. Now I want to setup a Python version >= 3.1.3, because my materials for learning are using this version. Typing python into terminal results version 2.6.1, using ...
1
vote
1answer
4k views

Python to Windows command prompt interface

Is there a way I could send commands to Windows command prompt Python? What I am looking to do is make a Python app on the desktop which receives commands through sockets from another computer/mobile ...
1
vote
2answers
14k views

Getting PATH right for python after MacPorts install

I can't import some python libraries (PIL, psycopg2) that I just installed with MacPorts. I looked through these forums, and tried to adjust my PATH variable in ~/.bash_profile in order to fix this ...
1
vote
1answer
654 views

ipython indentation problem on Mac OSX

I seem to be getting an odd problem when using iPython sometimes. Every time I try to go one line up or down (i.e. navigating through history or previous statements) it seems to put my cursor and ...
1
vote
1answer
2k views

Can not make work python in windows 7 64 bits

Tried installing python 3.13 64 bits, 3.13 32 bits and 2.7 64 bits. But none of them seems to work. Both 3.13 after installing it I run python.exe and it shows: Fatal Python error: Py_Initialize: ...
2
votes
1answer
6k views

How to change which Python version gets used in Snow Leopard?

Snow Leopard comes packaged with a version of Python 2.6 that is incompatible with many popular libraries, so I've downloaded a version of Python 2.6 from python.org. However, when I type python at ...
1
vote
3answers
5k views

“No commands supplied” error when executing a Python script on Ubuntu

I checked out a SVN repository, and tried to python setup.py on my Ubuntu 10.04 terminal, which is a Python script, but I get the following error: abc@def:~/Downloads/a-read-only$ python setup.py ...
1
vote
1answer
629 views

Having a problem with easy_install on osx 10.6

I've been doing some Google searches and come up short. Output is the following $ easy_install yolk 'import site' failed; use -v for traceback Traceback (most recent call last): File "/usr/bin/...
1
vote
2answers
2k views

How do I create a python daemon in Windows?

I want to create a python daemon in windows named daemon.py. There is a file a.py which is used to take backup. I want to run this file every hour as background process. After one hour this daemon.py ...
0
votes
2answers
484 views

'.htaccess' file Disappeared after i upload it to ftp on alwaysdata.com

I follow this article : deploying-django-at-alwaysdata-com and i'm not successful now , look my site : http://zjm1126.alwaysdata.net/: i think it is due to the '.htaccess' file , so i create it ...
2
votes
0answers
219 views

Branch names not showing in Mercurial's tab completion

I have a development machine running mercurial 1.6.3. Tab completion in bash works great for completing commands, tags and branch names. I've set up a new machine with the same mercurial version (both ...
2
votes
3answers
540 views

View Script Over SSH?

A friend, using a remote machine, ran a script that SSHed to my machine, and ran the following python script that resides on my machine: while (1): ....print "hello world" (this script simply ...
1
vote
1answer
3k views

Why doesn't iPython see readline?

I am trying to compare/contrast various python tools and I would like ipython in the mix, but when I run ipython I get the readline warning even though readline is installed on my mac: WARNING: ...
5
votes
1answer
4k views

How to install Python newt or snack in Mac OS X for byobu

I've installed byobu in Mac OS X 10.6.5. It will start, (i.e. it will start a screen session) but in order to run byobu-config and probably in order to do some other things I need a module called ...
1
vote
1answer
8k views

Any way to (easily) upgrade Python in Ubuntu?

I had Ubuntu 10.04 installed, which came with Python 2.6. Then I installed 3.1 and just used either one. At one point I think I installed a bunch of libraries as well, must've used apt-get to get a ...
2
votes
3answers
3k views

Always run a particular python script when system starts

How can I have a particular python script always run on my system automatically when my system starts until I shut down? There should be some simple way by which I can just put that small script in ...
0
votes
6answers
474 views

Hit a website every X minutes [closed]

Is there any script or service that hits a specified website every X minutes?
2
votes
1answer
124 views

problems on installing py25-py2app-devel

I'm trying to install py25-py2app-devel on a Mac 10.5.8 Darwin 9.8.0 because it's required to py25-matplotlib. Using porticus I receive this error: Error: Target org.macports.destroot returned: ...
1
vote
2answers
463 views

Video from Frames at the OS X Command Line or Python?

I am looking for a good way to turn a stack of images into a video on the command line or python. Here is my setup: OS X 10.6 Sequence of images either in png or pdf format. (i.e. 001.png, 002.png,...
1
vote
3answers
593 views

How to capture the arguments passed to an .exe when is called by another program? (Windows)

I have two programs: When A.exe is running, it calls B.exe with a series of arguments. Any suggestions as to how can I see these arguments? I could write another B.exe program to do that, but it ...
1
vote
0answers
2k views

ImportError: No module named _md5

I am trying to install Altera's Quartus 10 web edition 32 bit (but I think only the 32bit part is relevant to my problem) on Fedora 14 (x86_64bit), which runs inside a VM. When I run the installer: ...
5
votes
1answer
3k views

Launch XBMC from command line and play movie from timepoint

What is the easiest way to launch XBMC and play a movie from a certain timepoint? Apparently there aren't many command line options (ref), and the XBMC python scripts seem to be designed to run from ...
1
vote
1answer
772 views

How do I totally reinstall setup tools and all associated stuff

My setups tools system appears to be broken beyond recovery. And no doubt my attempts at recovering it have made it worse. Now I'm looking for the "nuke the site from orbit" option. I've already ...
9
votes
5answers
10k views

Adding programming code into LaTex / LyX

Maybe I'm just being thick, but I can't find any sensible way to simply paste in my (python) code into latex without losing all the indent information (kinda important for python). Anyone got any ...
2
votes
1answer
307 views

Modern Python installation in home folder for scientific computing on RHEL

For various reasons, our system administrator finds Ubuntu to be too cutting-edge for our production workstation, and we have now installed Red Hat Enterprise Linux 5.5 (RHEL). I'm not terribly ...
3
votes
3answers
8k views

How can I get apt-get to install python packages for a different version of python?

In Ubuntu 10.10, I have installed python 2.7. I would like to use apt-get to install packages to this version of python but I haven't been able to figure out how. Things I have tried without success:...
1
vote
1answer
3k views

Why urllib2 doesn't work for me?

I have installed 3 different python script on my ubuntu 10.04 32 bit machine with python 2.6.5. All of these use the urllib2 and I always get this error: urllib2.URLError: Why ? Examples: >>...
0
votes
1answer
160 views

cgi-bin python script not working because of too many file permissions?

Yesterday python got activated on my web space as cgi-bin. I tried to run some scripts, but with little success. I asked the support for help, they kept saying the file permissions where the issue and ...
6
votes
7answers
18k views

How to convert .xlsx to .txt?

I want to know if there is a Linux tool or a script available to convert .xlsx file to .txt.
0
votes
3answers
1k views

remotely execute bash or python scripts via webserver on ubuntu

Hi I want to run certain scripts on my linux machine by simply clicking a link on a webpage that is supplied by a webserver running on that machine. It is currently running ubuntu, which webserver ...
2
votes
1answer
6k views

dpkg: error processing /var/cache/apt/archives/python2.6-minimal_2.6.6-5ubuntu1_i386.deb (--unpack)

I had an issue (Question 199582) which was resolved. Unfortunately I am stuck at this point now. Running root@X100e:/var/cache/apt/archives# apt-get dist-upgrade Reading package lists... Done ...
16
votes
6answers
33k views

installing wxpython via pip or easy_install

I am running into some problems installing wxpython using pip. Here is my current output: [myuserid]% sudo pip install wxpython Downloading/unpacking wxpython Downloading wxPython2.8-win64-devel-2....
2
votes
1answer
2k views

Is there a Python 3 console plugin for gedit?

I recently moved from Windows to Ubuntu and am settling into a new text-editor; gedit. With its plugins, gedit is surprisingly capable. I thought I would need to run"Notepad++ in Wine", but the ...
0
votes
1answer
2k views

How to install Psyco: Getting “No Python installation found in Registry”

I want to install Psyco on my Windows 7 x64. I have Python 3 installed but i am getting the error No Python Installation Found in Registry