Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a way to fix this, patching the <strong>os</strong> module on your's python environment start.</p> <p>The function to create symlinks is already avaliable from Windows API, you only need do call it.</p> <p>During python's startup, an attempt is made to import a module named <strong>sitecustomize.py</strong>, on the <a href="http://docs.python.org/library/site.html" rel="nofollow noreferrer">site-packages directory</a>. We will use this hook to attach our function to the os module.</p> <p>Put this code on the file sitecustomize.py:</p> <pre><code>import os __CSL = None def symlink(source, link_name): '''symlink(source, link_name) Creates a symbolic link pointing to source named link_name''' global __CSL if __CSL is None: import ctypes csl = ctypes.windll.kernel32.CreateSymbolicLinkW csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32) csl.restype = ctypes.c_ubyte __CSL = csl flags = 0 if source is not None and os.path.isdir(source): flags = 1 if __CSL(link_name, source, flags) == 0: raise ctypes.WinError() os.symlink = symlink </code></pre> <hr> <p>Your Python process needs to be started with enabled "Create symbolic links" privilege, this is not a Python issue, every program that claims to use this Windows API will need it. This can be done running your Python interpreter from an elevated <code>cmd.exe</code>. A better alternative is to grant the privilege to the user, provided your Windows edition ships with the required Group Policy editor (<code>gpedit.msc</code>). See the screenshot below. You can adjust the value to include whatever user or security group requires this kind of privilege without compromising on the security of the administrative accounts.</p> <p><img src="https://i.stack.imgur.com/O8rns.png" alt="The group policy editor"></p> <p><strong>Note:</strong> Code snippet from <a href="https://stackoverflow.com/questions/1447575/symlinks-on-windows/4388195#4388195">here</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload