Hi,

On 4 September 2012 15:44, Wayne Werner <wa...@waynewerner.com> wrote:
>> I actually just want the functionality of a shortcut so that I can put an
>> icon on the desktop. symlink allows that in Unix (and a few other
>> capabilities that I'm not that intersted in) and just want something
>> equivalent to the menu item for making a shortcut in Windows.
>
>
> At least in Windows 7+, you can use the mklink command (as administrator):
>
> import subprocess
> subprocess.check_call(['mklink',
>                        '/D', #Use /H for a hard link
>                        '\users\yourname\desktop\yourfile.txt',
>                        '\path\to\yourfile.txt'])
>
> HTH,
> Wayne

Yes, but as already noted symbolic links are a newish feature that is
not available on older OS's, so the original poster probably wants to
look at API's to create actual shortcut's given that he's targeting
WinXP etc.

Regards

Walter
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to