2009/6/9 spir <[email protected]>:
> is there a way to make glob work in a specified dir?

glob needs a pathname and uses the current dir if no full path is
given. Prepend the path to your match (*.txt in example below) and it
works like you want it.

>>> import glob
>>> glob.glob('c:\\GTK\\*.txt')
['c:\\GTK\\license.txt']

Greets
Sander
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to