Newbie Question: Shell-like Scripting in Python?

Alex Martelli aleax at aleax.it
Wed Oct 2 04:06:25 EDT 2002


Michael Stenner wrote:
        ...
>>   rename foo.* bar.*
        ...
> The only troublesome thing I see here is that "foo.*" is going to be
> expanded by the shell (I think this is true for dos also) before your

No, neither COMMAND.COM (good old DOS and Win/95 - /98) nor CMD.EXE
(Win/NT, /2000, /XP) perform wildcard expansions.  You can of course
link your own compiled programs with a library that will perform such
expansion (C compilers for DOS often used to supply a file called
argexpand.c or the like for this purpose), but Python is not thus
linked in any pre-built Python distribution I ever heard of, nor are
there any requests for such linking in the standard source distro.


Alex




More information about the Python-list mailing list