Windows95: initializing Python env on start-up

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Sun Aug 20 01:17:22 EDT 2000


You're close, but not quite.  The reason

>     call C:\Downloaded\py152\setup.bat

works in an MS-DOS prompt but not in AUTOEXEC.BAT, is that at the time
AUTOEXEC.BAT is loading, the OS has no way of interpreting long file names.
I bet if you hit ESC while the Windows95 logo is on the screen, you'll see
"Bad command or file name" or something of the sort.

Find the short name for C:\Downloaded (probably c:\downlo~1) and try again,
using that.


You-wouldn't-have-this-problem-under-NT-ly y'rs...

--
----------------------------------------------------------------------
Olivier A. Dagenais - Software Architect and Developer
"R is a velocity measure, defined as a reasonable speed of travel
that is consistent with health, mental wellbeing and not being more
than say five minutes late." - Douglas Adams, HHGG, Chapter 34


"Michael Dyck" <MichaelDyck at home.com> wrote in message
news:399F3AD3.E3D9FAC3 at home.com...
> I downloaded PIL for Windows95, and the README says:
>
>     Before you can run the Python interpreter, you must set a number of
>     environment variables.  This can be done automatically by running the
>     \py152\setup file.
>     To get a permanent setup, you can call the setup file from
>     autoexec.bat (Windows 95/98), ...
>
> Unfortunately, they don't give the exact syntax for doing this. After some
> experimentation in an "MS-DOS Prompt" window, I found that the command
>
>     call C:\Downloaded\py152\setup.bat
>
> had the desired effect, so I added the same line to my C:\AUTOEXEC.BAT
> file and restarted Windows. But Windows seems to completely ignore the
> line. Specifically, when I start an "MS-DOS Prompt" window, the variables
> PYROOT, PYTHONPATH, etc have not been defined, and PATH has not been
> modified to include PYROOT.  However, the commands in autoexec.bat before
> and after the "call" command *have* been executed.
>
> And yes, I've checked numerous times that the command in the autoexec.bat
> file is the same as the one that works at the MS-DOS prompt.
>
> So: is there a different syntax I need to use in order to execute
> py152\setup.bat from autoexec.bat?
>
> And if there *were* something wrong with a command in autoexec.bat, would
> error messages get written somewhere?
>
> Far-more-at-home-in-Unix-ly y'rs,
> -Michael Dyck





More information about the Python-list mailing list