[IPython-dev] Re: Re: rehash on Win*
Daniel 'Dang' Griffith
pythondev-dang at lazytwinacres.net
Thu Jun 24 14:04:24 CDT 2004
> > You can get the extensions from os.environ['pathext']:
> > In : import os
> > In : print os.environ['pathext'].split(';')
> > ['.PYC', '.PY', '.COM', '.EXE', '.BAT', '.CMD', '.VBS', '.VBE', '.JS', '.JSE', '.WSF', '.WSH']
> Thanks. Right now this is a settable string by the user, should I instead use
> this $pathext variable? Which is the more natural approach for Windows users?
> If $pathext is universal under windows, I could then leave the
> windows-specific code as:
I realized after I sent the above that I don't know if it works on Win9x.
I know it works on WinNt, Win2k and WinXp. I don't know how much of
your user base that might affect.
I don't want to suggest too much, yet, as I've still not had a chance to
look at the rehash/alias Magic py file. I know it doesn't seem to work
"as expected" (whatever that means) on my machine. The 'echo' posted
earlier is not a good test on Windows, since 'echo' is a built-in, like 'dir',
and so isn't anywhere in the PATH. (Well, it might be, if some has an
echo.exe or whatever, but it's ignored, because Win* processes built-ins
before searching the PATH.)
I'll try to get to the code tonight, but the weather's been nice for a few
days, which means all of the yardwork I've been enjoying neglecting is
now needing to be done.
More information about the IPython-dev