On Mar 20, 10:33 am, Jonathan Fine <[EMAIL PROTECTED]> wrote: > Hello > > My problem is that I want a Python 2.4 module on > a server that is running Python 2.3. I definitely > want to use the 2.4 module, and I don't want to > require the server to move to Python 2.4. > > More exactly, I am using subprocess, which is > new in Python 2.4. What I am writing is something > like > === > from subprocess import Popen > === > > This will fail in Python 2.3, in which case I > would like to write something like > === > try: > from subprocess import Popen > else ImportError: > from somewhere_else import Popen > === > > Put this way, it is clear (to me) that somewhere_else > should be python24. > > In other words, I'm asking for a python24 package that > contains all (or most) of the modules that are new to > Python 2.4. > > I've looked around a bit, and it seems that this > formulation of the solution is new. I wonder if > anyone else has encountered this problem, or has > comments on my solution. > > -- > Jonathan
You might be able to use the "from future import SomeModule" syntax to accomplish this, but I am not sure. Other than that, I would just recommend using the os.popen calls that are native to 2.3 Mike -- http://mail.python.org/mailman/listinfo/python-list