Jason R. Coombs <jar...@jaraco.com> added the comment:

I'm not sure the setting has to be restored. All that's being added is an 
attempt to assign the symlink privilege to the current process token.

I would consider to attempt to assign the privilege when the Python process 
starts up (or when os is loaded) - and if the privilege can't be assigned, 
remove the .symlink function from os. This change could be coupled with also 
removing .symlink if running on XP (rather than raising the 
NotImplementedError).

This approach would avoid the need to expose additional functions, and most 
importantly would work best with existing implementations -- namely, that if 
os.symlink exists, one can create symlinks.

----------

_______________________________________
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

Reply via email to