I envy newbies

Tim Peters tim_one at email.msn.com
Sat Jul 17 00:34:29 EDT 1999


[Ivan]
> ...
> Oh, poo, Timmy.  Everything else under the M$ sun mucks with your
> autoexec.bat file, why shouldn't Python?  "Backups are for p'takh!"
> --Klingon Programmer Aphorism;-)

In 5 years of running 95 and NT, only one program (a virus scanner) has ever
had the audacity to change my autoexec.bat.  This isn't DOS!  Well, OK, 95
is.  But 95 has other mechanisms too, and if you install software that edits
yours it must be old enough to vote <wink>.

Changing that file is dangerous, in part because bat files have secret
line-length limitations, the installer can't possibly know where in the path
to place a new directory (potential shadowing), and an uninstaller would
have to be smart to undo its changes (e.g. blindly restoring the file it
started from would be wrong).

So modern a-go-go installations do the safe thing instead:  wildly overwrite
every DLL in the System directory <wink>.

> Besides, I don't think IDLE will work if you don't have Tcl in your
> path,

Poor Guido recently wrote FixTk.py (in Lib/lib-tk/) to try to guess where
Tcl lives under Windows (the Tcl/Tk installer doesn't touch autoexec.bat
either); it's invoked automatically as soon as IDLE tries to import Tkinter.

> and if you have to add that, why not add Python?

Because "24 Hours" is in the title of your book, and it can take a newbie
twice that long just to recover from a botched edit of this critical shared
system file <0.7 wink>.

> Well, obviously I should go forth and re-format my hard drive and re-
> install W98 and then re-install Python. ...  But I really don't feel
> like a little root canal today, so I'll take your word for it that my
> autoexec.bat file is left virgin and pristine by Python's installer.

The installation script is in (the source distribution's)
PCbuild/python15.wse -- although reading that will increase your
appreciation for root canals <wink>.  If you want to check it out, just edit
your autoexec.bat then reinstall Python over your current installation.

> ...
> I still maintain that the installer *ought* to modify your path; really,
> that should be safe enough,

Afraid not -- and that's why nothing else (written this decade) does it
anymore either.

making-newbies-do-it-by-hand-cleverly-shifts-the-blame-for-the-
    problems-onto-them-ly y'rs  - tim






More information about the Python-list mailing list