[Tutor] making a shortcut in windows

Garry Willgoose Garry.Willgoose at newcastle.edu.au
Tue Sep 4 15:10:19 CEST 2012


Oscar,

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. 

> On 4 September 2012 02:57, Garry Willgoose <Garry.Willgoose at newcastle.edu.au> wrote:
> I want to put a shortcut onto the desktop in windows (XP and later) in Python 2.6 or later. In Unix its easy using os.symlink but I can't find anything equivalent for windows. My searches on the web led me to the code below but the code returns the error
> 
> AttributeError: function 'CreateSymbolicLinkW' not found
> 
> so does anybody have any suggestions?
> 
> Are you really trying to create a symbolic link? Note that this is not the same thing as a 'shortcut' in Windows. If you say why you want the shortcut someone may be able to help you find another way of doing what you want.
> 
> Oscar


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120904/1fb567dc/attachment-0001.html>


More information about the Tutor mailing list