distutils can do this with a post-install script. See the distutils documentation. This is a script I wrote that did this (and other stuff): import sys import os
if sys.argv[1] == '-install': # Append .py to scripts os.rename(os.path.join(sys.prefix, 'Scripts', 'anikom15'), os.path.join(sys.prefix, 'Scripts', 'anikom15.py')) file_created(os.path.join(sys.prefix, 'Scripts', 'anikom15.py')) # Create desktop and start menu shortcuts desktop = get_special_folder_path("CSIDL_COMMON_DESKTOPDIRECTORY") startmenu = get_special_folder_path("CSIDL_COMMON_STARTMENU") create_shortcut(os.path.join(sys.prefix, 'Scripts', 'anikom15.py'), "Launch Anikom15's Computer Game", os.path.join(desktop, 'Anikom15.lnk'), '', '', os.path.join(sys.prefix, 'Icons', 'anikom15.ico')) file_created(os.path.join(desktop, 'Anikom15.lnk')) create_shortcut(os.path.join(sys.prefix, 'Scripts', 'anikom15.py'), "Anikom15's Computer Game", os.path.join(startmenu, 'Anikom15.lnk'), '', '', os.path.join(sys.prefix, 'Icons', 'anikom15.ico')) file_created(os.path.join(startmenu, 'Anikom15.lnk')) elif sys.argv[1] == '-remove': pass On Tue, 2011-02-01 at 21:43 +0000, Diesel wrote: > Hi, > > I'd like to add menu entry in the Program Menu as part of the > installation of an application. Is it possible to do that from Python? > > Any examples or link? I have not been able to find anything with > google... > > thanks in advance > s/ >
-- http://mail.python.org/mailman/listinfo/python-list