Top "Python-2.4" questions

For issues relating to development in Python, version 2.4.

Python idiom to return first item or None

I'm sure there's a simpler way of doing this that's just not occurring to me. I'm calling a bunch of …

python idioms python-2.4
How to safely open/close files in python 2.4

I'm currently writing a small script for use on one of our servers using Python. The server only has Python 2.4.4 …

python file-io python-2.4
In Python 2.4, how can I strip out characters after ';'?

Let's say I'm parsing a file, which uses ; as the comment character. I don't want to parse comments. So if …

python string python-2.4
telnetlib python example

So I'm trying this really simple example given by the python docs: import getpass import sys import telnetlib HOST = "<…

python telnetlib python-2.4
Unpickling a python 2 object with python 3

I'm wondering if there is a way to load an object that was pickled in Python 2.4, with Python 3.4. I've been …

python python-3.x pickle python-2.4 python-2to3
Saving stdout from subprocess.Popen to file, plus writing more stuff to the file

I'm writing a python script that uses subprocess.Popen to execute two programs (from compiled C code) which each produce …

python linux subprocess stdout python-2.4
Python try/except not working

Trying to get the try/except statement working but having problems. This code will take a txt file and copy …

python try-catch python-2.4
How to unzip a file with Python 2.4?

I'm having a hard time figuring out how to unzip a zip file with 2.4. extract() is not included in 2.4. I'm …

python zip zipfile python-2.4
How to make Python format floats with certain amount of significant digits?

I want my Python (2.4.3) output numbers to have a certain format. Specifically, if the number is a terminating decimal with &…

python string number-formatting python-2.4
SMTP AUTH extension not supported by server in python 2.4

This is my normal code in my VPS hosting which provide python 2.4 def mail(receiver,Message): import smtplib try: s=…

python linux smtp vps python-2.4