I envy newbies

Ivan Van Laningham ivanlan at callware.com
Sat Jul 17 09:42:34 EDT 1999


Hi All--

Tim Peters wrote:
> 
> 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>.
> 

I just looked at my autoexec.bat.  Borland C++ modifies the path.  The
NetWare client modifies your path and sets an environment variable.  The
Creative Ensoniq install sets some environment variables.  Most installs
that change autoexec.bat ask your permission first, and make backups.

> 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).
> 

Usually, these things modify the path by simply adding a line like this:

	PATH=L:\BC5\BIN;%PATH%

which does get around the simple line length limitation.  The actual
length of the path variable in the environment seems to not suffer the
255 character limits that W3.1 had; I was pushing or exceeding that
limit with 3.1, but I have no such problems now.

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

Hmmm, yes.  I think the moral here is obvious.

> > 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.
> 

I had to add it to my NT path environment variable before IDLE would
work.

If newbies are *ever* going to use Python, the path has to be correct.

> > 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>.
> 

But there may be no alternative.

> 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 shall.  I've got a new system that I can afford to mess up.

Does or does not Win32All modify your path?

> > ...
> > 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.
> 

Borland was written this decade--at least the install was.  Novell's
NetWare client has a spiffy new install.  The ancestry of these things
may be as old as you are, Timmy, but their installs are fairly new.

Hacking the autoexec.bat is safer than dumping DLLs into the system32
directory.  Have you tried installing AOL4.0 by downloading it
recently?  Not only does it overwrite all your TCP/IP DLLs with old gunk
that f**ks every other form of networking you've got, but IT WON'T
BELIEVE THAT IT HAS ALREADY SCREWED YOU UP, so it keeps on trying to
re-copy the bad DLLs to your system32 directory every time you re-boot.

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

Honestly, I can't tell them, "cd to your Python directory for every
exercise in this book."  I'd rather tell my readers to edit their
autoexec.bat than tell them how to cd to a directory with spaces in the
path.  Bleaugh;-(>

<shifting-the-blame-to-timmy-is-fun-easy-and-educational-too!>-ly y'rs,
Ivan;-)
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan at callware.com
ivanlan at home.com
http://www.pauahtun.org
See also: 
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
----------------------------------------------




More information about the Python-list mailing list