Advice Needed re: MS-DOS/Win 98 as Python environment

Frederick Bartlett fbartletFIXIT at optonline.net
Fri Jan 24 19:54:13 EST 2003


zenguyuno at yahoo.com wrote:
> I generally run my python programs from a DOS window under Win 98.  Is
> there a better way?  (yeah, I know, use linux, but I feel I'm too old to
> relearn so much)

It's not so much -- Linux has GUIs, too

> When I open MS-DOS the initial directory is Windows.  I can't figure out
> how to make this come up as Python22.  I know about autoexec.bat, I used
> to use it a lot, but I don't know where MS-DOS under Win 98 looks for
> the autoexec batch file to execute.  Can anyone please tell me?

This is a bit off-topic, but here goes:

In autoexec.bat, which is in your root directory, inspect the PATH 
statement. It'll look like this:
   path C:\WINDOWS;C:\WINDOWS\COMMAND;c:\windows\system
Change it so it looks like
   path C:\WINDOWS;C:\WINDOWS\COMMAND;c:\windows\system;c:\python22
Then set your PYTHONPATH to point to any necessary directories; e.g.,
   set PYTHONPATH=C:\python22\lib\site-packages\DCOracle2
(which I need to access Oracle db's)

To change the default directory of your command prompt, edit its pif. 
Right-click on the command prompt icon; choose Properties and the 
Program tab, and you'll see what to do. You can even set up a 
python-specific batch file to run if you need to.

Then restart Windows; python should work hitchlessly.

Fred







More information about the Python-list mailing list