Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Alan Gauld
Bill Campbell [EMAIL PROTECTED] wrote in messageThe 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

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Bill Campbell
On Mon, Oct 16, 2006, Alan Gauld wrote: Bill Campbell [EMAIL PROTECTED] wrote in messageThe 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

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Kent Johnson
Alan Gauld wrote: Bill Campbell [EMAIL PROTECTED] wrote in messageThe 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

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Alan Gauld
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:

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Mike Hansen
[...] I certainly wouldn't like to see python breaking backwards compatibility, which is probably my primary gripe about open source software (although Bell Labs was equally guilty when they did things like change the ``grep -y'' option to ``grep -i''). Bill From what I understand,

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread wesley chun
From what I understand, Python 3000 is going to break backwards compatibility. However, I think I read that someone is writing a utility that will translate your pre-Python 3000 code to Python 3000 code. this will mainly be side effects or for features that are deprecated (sufficient notice is

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread Kent Johnson
wesley chun wrote: From what I understand, Python 3000 is going to break backwards compatibility. However, I think I read that someone is writing a utility that will translate your pre-Python 3000 code to Python 3000 code. this will mainly be side effects or for features that are deprecated

Re: [Tutor] python equivalent of perl readlink()?

2006-10-16 Thread wesley chun
On 10/16/06, Kent Johnson [EMAIL PROTECTED] wrote: wesley chun wrote: From what I understand, Python 3000 is going to break backwards compatibility. However, I think I read that someone is writing a utility that will translate your pre-Python 3000 code to Python 3000 code. this will

[Tutor] python equivalent of perl readlink()?

2006-10-15 Thread Bill Campbell
Is there a python equivalent of the perl readlink() function (e.g. one that returns the relative path in cases where a command such as ``ln -s ls /usr/local/bin/gls'' created the link? Reading the documentation on the various os.path functions, the only thing I see returns the fully resolved path

Re: [Tutor] python equivalent of perl readlink()?

2006-10-15 Thread Michael P. Reilly
On 10/15/06, Bill Campbell [EMAIL PROTECTED] wrote: Is there a python equivalent of the perl readlink() function(e.g. one that returns the relative path in cases where a commandsuch as ``ln -s ls /usr/local/bin/gls'' created the link?Reading the documentation on the various os.path functions,

Re: [Tutor] python equivalent of perl readlink()?

2006-10-15 Thread Bill Campbell
On Sun, Oct 15, 2006, Michael P. Reilly wrote: On 10/15/06, Bill Campbell [EMAIL PROTECTED] wrote: Is there a python equivalent of the perl readlink() function (e.g. one that returns the relative path in cases where a command such as ``ln -s ls /usr/local/bin/gls'' created the