[Tutor] calling modules in different minor versions of Python

Gregory, Matthew matt.gregory at oregonstate.edu
Tue Nov 22 20:12:29 CET 2011


Hi all,

We work with a python package (ESRI geoprocessor) that only releases their packages tied to specific minor version of Python (e.g. 2.5).  We are predominantly working with 2.6, but have Python 2.5 installed as well.

When we want to call modules that use the geoprocessor package, we are using subprocess.call from 2.6:

  subprocess.call('C:/Python25/Python spam.py <list of args>')

where spam.py is a module that uses the geoprocessor and <list of args> are the arguments to pass.  Apart from moving our code base to 2.5, is there a better way to handle this that doesn't require a separate subprocess call?

thanks, matt


More information about the Tutor mailing list