[Tutor] python equivalent of perl readlink()?

Kent Johnson kent37 at tds.net
Mon Oct 16 17:45:17 CEST 2006


Alan Gauld wrote:
> "Bill Campbell" <bill at celestial.net> wrote in message >>   The 
> function is in the os module ([2]
>>>   http://docs.python.org/lib/os-file-dir.html).
>> Silly me.  I was looking in the os.path module :-).
> 
> Yes, its confusing/. One thing that should be rationalised IMHO
> is the various os modules.There are os, os.path, shutil, and now
> subprocess too.

The portions of these modules that have to do with files and file paths 
are collected in the path module which many people find very handy:
http://www.jorendorff.com/articles/python/path/index.html

A version of this has been proposed for the standard library:
http://www.python.org/dev/peps/pep-0355/

Unfortunately not everyone loves this module and there has been a fair 
amount of wrangling about the details and for now PEP 355 is rejected.

Kent



More information about the Tutor mailing list