[Tutor] File mode tests
Bill Campbell
bill at celestial.net
Fri Jul 30 02:18:15 CEST 2004
I'm just getting my feet wet with python after programming primarily in
perl since perl-3.something. I've read the Harms and McDonald ``The Quick
Python Book'', and O'Reilly's ``Learning Python'', but haven't been able to
find python equivalents to these perl tests (lots of others in os.path, but
not these :-).
if ( -x path ) # is is executable
if ( -r path ) # is it readable
if ( -w path ) # is it writeable
I would love to find documentation, something like ``python for the perl
hacker'' that would help in the transition.
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Systems, Inc.
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
``Mechanical Engineers build weapons. Civil Engineers build targets.''
More information about the Tutor
mailing list