Jason R. Coombs <jar...@jaraco.com> added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9333> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com