This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients brian.curtin, eric.smith, jaraco
Date 2010-07-22.22:18:34
SpamBayes Score 2.2672504e-07
Marked as misclassified No
Message-id <1279837121.8.0.574684205998.issue9333@psf.upfronthosting.co.za>
In-reply-to
Content
I think we should consider simply calling this function before running os.symlink. It would be nice if the API were as compatible as possible on both unix and Windows.

My worry is that where code that works on unix systems is simply:

    os.symlink(...)

But now to support symlinks on Windows, one must write:

    if hasattr(os, 'enable_symlink') and not os.enable_symlink():
        raise WindowsError(...)
    os.symlink(...)

Maybe instead of adding os.enable_symlink, Python should include the above logic before attempting to create a symlink and raise an exception if it fails? This would provide a consistent API across platforms for the most common use-case.
History
Date User Action Args
2010-07-22 22:18:41jaracosetrecipients: + jaraco, eric.smith, brian.curtin
2010-07-22 22:18:41jaracosetmessageid: <1279837121.8.0.574684205998.issue9333@psf.upfronthosting.co.za>
2010-07-22 22:18:34jaracolinkissue9333 messages
2010-07-22 22:18:34jaracocreate