Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional CWD argument to os.path.abspath() #37875

Closed
gregklanderman mannequin opened this issue Jan 31, 2003 · 8 comments
Closed

add optional CWD argument to os.path.abspath() #37875

gregklanderman mannequin opened this issue Jan 31, 2003 · 8 comments
Labels
stdlib Python modules in the Lib dir

Comments

@gregklanderman
Copy link
Mannequin

gregklanderman mannequin commented Jan 31, 2003

BPO 677890
Nosy @brettcannon
Files
  • os.path.patch: patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-03-12.04:31:05.000>
    created_at = <Date 2003-01-31.01:23:08.000>
    labels = ['library']
    title = 'add optional CWD argument to os.path.abspath()'
    updated_at = <Date 2007-03-12.04:31:05.000>
    user = 'https://bugs.python.org/gregklanderman'

    bugs.python.org fields:

    activity = <Date 2007-03-12.04:31:05.000>
    actor = 'gregklanderman'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2003-01-31.01:23:08.000>
    creator = 'gregklanderman'
    dependencies = []
    files = ['4979']
    hgrepos = []
    issue_num = 677890
    keywords = ['patch']
    message_count = 8.0
    messages = ['42616', '42617', '42618', '42619', '42620', '42621', '42622', '42623']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'collinwinter', 'jlgijsbers', 'gregklanderman']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue677890'
    versions = []

    @gregklanderman
    Copy link
    Mannequin Author

    gregklanderman mannequin commented Jan 31, 2003

    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@klanderman.net

    @gregklanderman gregklanderman mannequin closed this as completed Jan 31, 2003
    @gregklanderman gregklanderman mannequin added the stdlib Python modules in the Lib dir label Jan 31, 2003
    @gregklanderman gregklanderman mannequin closed this as completed Jan 31, 2003
    @gregklanderman gregklanderman mannequin added the stdlib Python modules in the Lib dir label Jan 31, 2003
    @gregklanderman
    Copy link
    Mannequin Author

    gregklanderman mannequin commented Jan 31, 2003

    Logged In: YES
    user_id=698972

    sorry, trying again to attach the patch..

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

    What about ntpath.py and os2emxpath.py?

    @brettcannon
    Copy link
    Member

    Logged In: YES
    user_id=357491

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

    @gregklanderman
    Copy link
    Mannequin Author

    gregklanderman mannequin commented Feb 5, 2003

    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.

    @jlgijsbers
    Copy link
    Mannequin

    jlgijsbers mannequin commented Aug 21, 2004

    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.

    @collinwinter
    Copy link
    Mannequin

    collinwinter mannequin commented Mar 12, 2007

    What's your motivating use-case for this?

    @gregklanderman
    Copy link
    Mannequin Author

    gregklanderman mannequin commented Mar 12, 2007

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant