Domanda

As a better definition, how to write the following function in Python ?

def create_shortcut(source, dest):
    create a shortcut of file 'source' and put it in 'dest'
È stato utile?

Soluzione

If by "shortcut" you mean symlink, it's just

import os

os.symlink(source,dest)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top