why does activestate (win98) python not support globbing

Tim Peters tim.one at home.com
Thu Apr 12 21:55:43 EDT 2001


[/F]
> to be precise, it's a linking issue.  to get globbing behaviour, just
> link the executable with setargv.obj (provided with visual C).
>
> for some reason, GvR didn't want this as a default.  cannot recall
> his arguments, though...

Mark Hammond and I threatened to eviscerate him if he did:

C:\>dir *1

 Volume in drive C has no label
 Volume Serial Number is 2637-18E7
 Directory of C:\

MYDOCU~1       <DIR>        11-06-00  7:39p My Documents
PROGRA~1       <DIR>        11-06-00  7:39p Program Files
WINDOW~1       <DIR>        11-11-00  3:01p Windows Update Setup Files
WEP1           <DIR>        11-13-00  4:06p WEP1
         0 file(s)              0 bytes
         4 dir(s)       13,313.16 MB free

C:\>

Note that the "*1" also matches the (generated!) "short" names.  You don't
have to do

    del *1

and watch most of your "files with long names" disappear as a result twice to
be convinced that MS's idea of globbing should *never* be used by default (to
be clear, linking with setargv.obj gives your C program the same behavior as
the builtin-dir example above; using dir was just easier than showing C
source).





More information about the Python-list mailing list