Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8001
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <florencio.cano@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.034 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'received:209.85.160.174': 0.09; 'received:mail-gy0-f174.google.com': 0.09; 'subject:file': 0.14; 'module:': 0.16; 'subject:opening': 0.16; 'cc:addr:python- list': 0.17; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'message-id:@mail.gmail.com': 0.28; 'received:209.85.160': 0.29; 'cc:addr:python.org': 0.30; 'url:library': 0.31; "can't": 0.32; 'using': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'url:docs': 0.37; 'url:python': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'unix': 0.40; 'to:none': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=SExWFYDaSvkcmL8AiWUH+6134yGpiNPF661iO1IL6vg=; b=T4/24PGS8TiIcICw3AvGxXl/JsiMmTBKkc9AapIYWIm5BW9t2xQ8VgXz7TjaI/E7U2 zDAa1IP9LxTcjZ0TSmEepV/i4NiKtW7aBEA81BdqbhUib3byPrAbzPu31Uvd1aZI17HM QAy/McezlfKR5LZvLXBrBKYRpSuTginGBmu9M= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; b=udHMfdkYdwsU+svqzeIeG9Ll+2Dzv7pg8E+3Yu7n87PUSgcO61uIT1zbwtVHsHRjJq DasVXtNUXEd/6+7tv3xNI3JHkFCFZ620ksiIJgATyTwRN5MxQUNtj5mHwyquMYI8jMQu /RjA3SK4dZ9vEGRGez9IwBG75gWV9adsi0ta0= |
| MIME-Version | 1.0 |
| In-Reply-To | <201106192300.38697.tjhanson@yahoo.com> |
| References | <201106192300.38697.tjhanson@yahoo.com> |
| Date | Mon, 20 Jun 2011 08:14:14 +0200 |
| Subject | Re: opening a file |
| From | Florencio Cano <florencio.cano@gmail.com> |
| Cc | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.171.1308550457.1164.python-list@python.org> (permalink) |
| Lines | 10 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1308550457 news.xs4all.nl 49182 [::ffff:82.94.164.166]:38514 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8001 |
Show key headers only | 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 | Next — Next in thread | Find similar | Unroll 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