why does activestate (win98) python not support globbing

Palmer, Dan [SKY:1G21:EXCH] dpalmer at americasm01.nt.com
Thu Apr 12 13:25:52 EDT 2001


I was working through Programing python by Mark Lutz, and I can get Example
4-1 working under unix (from the 2.0 tar.gz), but when I tried to run this
under windows (win98 or win2000) it generates an error.  The following error
is generated.

In unix it expands the *.py to all the associated files.  In windows it does
not.  Why the difference.

pack1.py *.py > packed.txt
Traceback <most recent call last):
    File: "C:\Prog_Python\pack1.py", line 19, in ?
        input = open(name,'r')
IOError: {Error 22] Invalid argument:'*.py

---- Script
#! /usr/bin/env python
# File: pack1.py
# Example 4-1

import sys
marker = '::::::'

for name in sys.argv[1:]:
 input = open(name, 'r')
 print marker + name
 print input.read(),







More information about the Python-list mailing list