On 20/06/11 08:14:14, Florencio Cano wrote:
This works:
infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
This doesn't:
infile=open('~/prog/py_modules/this_is_a_test','r')
Can't I work with files using Unix expressions?
You can use the glob module:
http://docs.python.org/library/glob.html#module-glob
The glob module does not do tilde expandsion.
If you want that, you need os.path.expanduser():
http://docs.python.org/library/os.path.html#os.path.expanduser
-- HansM
--
http://mail.python.org/mailman/listinfo/python-list