[Patches] [ python-Patches-677890 ] add optional CWD argument to os.path.abspath()

SourceForge.net noreply at sourceforge.net
Mon Mar 12 05:34:55 CET 2007


Patches item #677890, was opened at 2003-01-30 20:23
Message generated for change (Settings changed) made by collinwinter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=677890&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Greg Klanderman (gregklanderman)
Assigned to: Nobody/Anonymous (nobody)
Summary: add optional CWD argument to os.path.abspath()

Initial Comment:
I would like to add an optional second argument to
os.path.abspath() to allow specifying the directory
with respect to which the path should be made
absolute.  This would be much like the optional second
argument of the expand-file-name function in emacs:

(expand-file-name NAME &optional DEFAULT-DIRECTORY)

The patch is against python 2.2.2.  I am running RH 6.3
linux 
but that should not matter.

thanks
Greg Klanderman
gak at klanderman.net


----------------------------------------------------------------------

Comment By: Greg Klanderman (gregklanderman)
Date: 2007-03-12 00:31

Message:
Logged In: YES 
user_id=698972
Originator: YES

Well, it's been 4 years and I'd pretty much forgotten about this.. but I
believe I had a case where my program had some configuration item - the
base directory w.r.t. which other files were to be found.  So if you have
one of those file names, it's convenient to use abspath() except you don't
want it relative to the process' cwd, you want it relative to the
configured directory.  Anyway, it's no big deal, you can just close this if
you want.

----------------------------------------------------------------------

Comment By: Collin Winter (collinwinter)
Date: 2007-03-11 20:49

Message:
Logged In: YES 
user_id=1344176
Originator: NO

What's your motivating use-case for this?

----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-08-21 08:55

Message:
Logged In: YES 
user_id=469548

Well, depends on what you mean by 'support'. I don't think
anyone seriously objects, but there doesn't seem to be
anyone who really cares either. That usually means that if
you care enough to create a complete implementation
(including tests and documentation changes) yourself, the
patch will be accepted. So please submit a new patch if you
do care enough.

----------------------------------------------------------------------

Comment By: Greg Klanderman (gregklanderman)
Date: 2003-02-05 13:09

Message:
Logged In: YES 
user_id=698972

i can submit a patch for those other versions of abspath. 
but i'd rather know whether there is support for this change
before doing that.



----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2003-02-05 05:16

Message:
Logged In: YES 
user_id=357491

And don't forget riscospath.py found in the plat-risc directory in Lib in
the source distribution.  =)

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2003-02-05 05:06

Message:
Logged In: YES 
user_id=357491

What about ntpath.py and os2emxpath.py?

----------------------------------------------------------------------

Comment By: Greg Klanderman (gregklanderman)
Date: 2003-01-30 20:28

Message:
Logged In: YES 
user_id=698972

sorry, trying again to attach the patch..

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=677890&group_id=5470


More information about the Patches mailing list