Re: [Python-Dev] [Python-checkins] cpython: Issue #12715: Add an optional symlinks argument to shutil functions (copyfile,

On Thu, Dec 29, 2011 at 11:55, antoine.pitrou <python-checkins@python.org> wrote:
Can we expect that readers on Windows know how os.symlink works, or should the stipulations of os.symlink usage also be laid out or at least linked to from there? Basically, almost everyone is going to get an OSError if they call this on Windows. You have to be on Windows Vista or beyond *and* the calling process has to have the proper privileges (typically gained through elevation - "Run as Administrator").

On Fri, 30 Dec 2011 13:29:36 -0600 Brian Curtin <brian@python.org> wrote:
I assume it won't make a difference in real life, since symlinks are quite rare under Windows.
I still haven't managed to use symlinks under Windows 7, myself. The recipes I've tried didn't work. Regards Antoine.

On Fri, Dec 30, 2011 at 13:39, Antoine Pitrou <solipsis@pitrou.net> wrote:
This might be a place where an image in the documentation would be helpful. I don't think we do that anywhere else, but maybe I could add it to the (sorely out of date and in need of a rebuild) Windows FAQ? What you need to do on Win7 is go to Start > All Programs > Accessories > Command Prompt, but right click on it instead of left click. Choose "Run as Administrator", then it'll make you choose yes or no to elevate privileges. At that point, deep in the heart of everyone's favorite operating system, it should acquire the SeCreateSymbolicLink user privilege. After that, os.symlink should work fine.

On Fri, 30 Dec 2011 13:29:36 -0600 Brian Curtin <brian@python.org> wrote:
I assume it won't make a difference in real life, since symlinks are quite rare under Windows.
I still haven't managed to use symlinks under Windows 7, myself. The recipes I've tried didn't work. Regards Antoine.

On Fri, Dec 30, 2011 at 13:39, Antoine Pitrou <solipsis@pitrou.net> wrote:
This might be a place where an image in the documentation would be helpful. I don't think we do that anywhere else, but maybe I could add it to the (sorely out of date and in need of a rebuild) Windows FAQ? What you need to do on Win7 is go to Start > All Programs > Accessories > Command Prompt, but right click on it instead of left click. Choose "Run as Administrator", then it'll make you choose yes or no to elevate privileges. At that point, deep in the heart of everyone's favorite operating system, it should acquire the SeCreateSymbolicLink user privilege. After that, os.symlink should work fine.
participants (2)
-
Antoine Pitrou
-
Brian Curtin