[Tutor] shutil question? on copying files

Scott Ralph Comboni scott@zenplex.com
05 Apr 2001 14:25:44 -0400


I have a question in regards to the shutil module.  I'm trying to copy
via a wildcard shutil.copy('/project/tambora/packages/*tar*', '/tmp')
and I get this.

 File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.0/shutil.py", line 26, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory:
'/projects/tambora/packages/*tar*'

It works fine if I put the complete path name in but I'd like to be able
to wildcard this. IS there a way to do this or another module to use? I
need to preform this function on *NIX and NT.
Thanks
Scott