A little disappointed so far
Steven Taschuk
staschuk at telusplanet.net
Mon May 19 02:54:30 EDT 2003
Quoth Graham Nicholls:
> Skip Montanaro wrote:
[...]
> > But wrong. ;-) os.access is almost never what you want. Try
> > os.path.exists() instead.
>
> Interesting, why ?
The Library Reference says:
access(path, mode)
Use the real uid/gid to test for access to path. Note that most
operations will use the effective uid/gid, therefore this routine
can be used in a suid/sgid environment to test if the invoking
user has the specified access to path. [...]
Seems clear enough.
> [...] And why did I not find this [...]
You really should take a few minutes to go through the Library
Reference and at least look at every module. (For most of them,
of course, this'll be just a glance long enough to read the first
paragraph and decide you don't care right now.)
In fact, I'm surprised you haven't done this already; skimming
reference material looking for interesting bits seems like a
strategy you'd have picked up in your years of programming.
> [...] - the books would just talk
> about the os module without saying what it offered beyond the specific
> function they were then talking about.
*shrug* Constraints of space, perhaps. Who knows? (Well, the
authors, I suppose; some of them read and post here, so you might
get a reply from the horse's mouth.)
In any case, the Library Reference is your friend.
--
Steven Taschuk staschuk at telusplanet.net
"[T]rue greatness is when your name is like ampere, watt, and fourier
-- when it's spelled with a lower case letter." -- R.W. Hamming
More information about the Python-list
mailing list