Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7782
| From | Chris Torek <nospam@torek.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: os.path and Path |
| Date | 2011-06-17 00:48 +0000 |
| Organization | None of the Above |
| Message-ID | <ite8950jj3@news6.newsguy.com> (permalink) |
| References | <mailman.8.1308188800.1164.python-list@python.org> <4df9ad53$0$29973$c3e8da3$5496439d@news.astraweb.com> <mailman.16.1308239495.1164.python-list@python.org> |
>Steven D'Aprano wrote:
>> Why do you think there's no Path object in the standard library? *wink*
In article <mailman.16.1308239495.1164.python-list@python.org>
Ethan Furman <ethan@stoneleaf.us> wrote:
>Because I can't find one in either 2.7 nor 3.2, and every reference I've
>found has indicated that the other Path contenders were too
>all-encompassing.
What I think Steven D'Aprano is suggesting here is that the general
problem is too hard, and specific solutions too incomplete, to
bother with.
Your own specific solution might work fine for your case(s), but it
is unlikely to work in general.
I am not aware of any Python implementations for VMS, CMS, VM,
EXEC-8, or other dinosaurs, but it would be ... interesting.
Consider a typical VMS "full pathname":
DRA0:[SYS0.SYSCOMMON]FILE.TXT;3
The first part is the (literal) disk drive (a la MS-DOS A: or C:
but slightly more general). The part in [square brackets] is the
directory path. The extension (.txt) is limited to three characters,
and the part after the semicolon is the file version number, so
you can refer to a backup version. (Typically one would use a
"logical name" like SYS$SYSROOT in place of the disk and/or
directory-sequence, so as to paper over the overly-rigid syntax.)
Compare with an EXEC-8 (now, apparently, OS 2200 -- I guess it IS
still out there somewhere) "file" name:
QUAL*FILE(cyclenumber)
where cycle-numbers are relative, i.e., +0 means "use the current
file" while "+1" means "create a new one" and "-1" means "use the
first backup". (However, one normally tied external file names to
"internal names" before running a program, via the "@USE" statement.)
The vile details are still available here:
http://www.bitsavers.org/pdf/univac/1100/UE-637_1108execUG_1970.pdf
(Those of you who have never had to deal with these machines, as I
did in the early 1980s, should consider yourselves lucky. :-) )
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: gmail (figure it out) http://web.torek.net/torek/index.html
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-15 19:00 -0700
Re: os.path and Path Laurent Claessens <moky.math@gmail.com> - 2011-06-16 09:03 +0200
Re: os.path and Path Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-16 07:58 +0000
Re: os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 09:16 -0700
Re: os.path and Path Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-16 16:41 +0000
Re: os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 10:18 -0700
Re: os.path and Path Eric Snow <ericsnowcurrently@gmail.com> - 2011-06-16 11:21 -0600
Re: os.path and Path Christian Heimes <lists@cheimes.de> - 2011-06-16 18:32 +0200
Re: os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 10:07 -0700
Re: os.path and Path Chris Angelico <rosuav@gmail.com> - 2011-06-17 11:00 +1000
Re: os.path and Path Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-16 07:14 +0000
Re: os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 09:05 -0700
Re: os.path and Path Chris Torek <nospam@torek.net> - 2011-06-17 00:48 +0000
Re: os.path and Path Ethan Furman <ethan@stoneleaf.us> - 2011-06-16 18:19 -0700
Re: os.path and Path Ned Deily <nad@acm.org> - 2011-06-16 19:55 -0700
Re: os.path and Path rusi <rustompmody@gmail.com> - 2011-06-16 21:24 -0700
csiph-web