Hi James and Chris, Thanks a lot for your replies. I discovered the source of the problem. When I first set up this new Python installation I noticed that it wasn't able to execute at all from a command prompt, so I created a batch file to launch the executable and put the batch file into a totally unrelated directory that was already being referenced in my PATH environment variable. This, of course, would not allow me to specify any options after typing "python" (although in retrospect I would expect that including an option in this case would throw some sort of Windows error). So, I removed the batch file and added the execution directory of the Python install to my PATH and it worked just fine.
To answer Chris' questions: Where is that Python build installed? Is "special" something that your company's software provides? My company's software is actually called Abaqus (for some reason I felt shy about revealing that) and it is executed from the command line using "abaqus". "abaqus python" is the way that the Abaqus-specific build of Python is executed. It is installed inside the Abaqus installation directory, not the default location. Incidentally, I found out today that setting the PYTHONPATH variable in Windows allows my two different installations of Python to access the same modules. I was very happy to discover that. :) Thanks again, James On Mon, Dec 6, 2010 at 9:01 AM, Christopher Barker <[email protected]>wrote: > On 12/5/10 6:18 PM, James Thiele wrote: > >> You might want to look into 'virtualenv', which sets up a self contained >> python install. >> >> Hey people, does virtualenv work on XP? >> > > yes. > > And it may be a good idea, but it's not directly the OP's problem: > > On Sun, Dec 5, 2010 at 5:56 PM, James Fort <[email protected] >> I've recently run into a Python issue. I hope that posting a >> question here is appropriate. >> > > of course, though a broader audience might be useful if we can't help! > > > My company's software is distributed with a special Python build >> that includes some custom packages. >> > > Where is that Python build installed? I sure hope it's not in the > "standard" place -- i.e. where the python.org install goes -- it's really > annoying when folks somehow assume that their software is the only thing > that's going to use Python. > > > I didn't want to mess with that >> install so I additionally installed Python 2.6.6 on my machine >> (Windows XP 32-bit) for experimentation purposes. >> > > But in any case -- you should be able to have multiple installs. > > > I noticed that I >> can run a script that I've written from a prompt with my company's >> distribution of Python using: >> >> >special python scriptName.py >> >> (where special is a prefix typed at the command prompt to identify >> this special installation of Python and not the generic 2.6.6 >> installation) >> > > is "special" something that your company's software provides? > > > However, if I try the same with Python 2.6.6, it simply opens the >> Python interpreter: >> >> >python scriptName.py >> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> > > OK -- that's weird -- that certainly should run scriptName.py. Are you sure > that you are getting the regular build you installed? You might try doing > something like: > > import sys > print sys.path > > it will give you an idea what python is running. > > what do you get when you type: > > "python -h" > > at the command line? It shoudl give you python's help message. > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [email protected] >
