Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8001

Re: opening a file

References <201106192300.38697.tjhanson@yahoo.com>
Date 2011-06-20 08:14 +0200
Subject Re: opening a file
From Florencio Cano <florencio.cano@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.171.1308550457.1164.python-list@python.org> (permalink)

Show all headers | View raw


> 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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: opening a file Florencio Cano <florencio.cano@gmail.com> - 2011-06-20 08:14 +0200
  Re: opening a file Hans Mulder <hansmu@xs4all.nl> - 2011-06-20 12:08 +0200

csiph-web