Frage

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'
War es hilfreich?

Lösung

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

import os

os.symlink(source,dest)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top