#!python """Windows-specific part of the installation""" import os, sys def install(): d = get_special_folder_path('CSIDL_STARTMENU') d = d + '\\IPython' if not os.path.isdir(d): os.mkdir(d) directory_created(d) os.chdir(d) # Create program shortcuts ... python = sys.prefix + '\\python.exe' f = d + '\\IPython.lnk' a = sys.prefix + '\\scripts\ipython.py' if not os.path.isfile(f): create_shortcut(python, 'IPython', f, a) file_created(f) f = d + '\\pysh.lnk' a = sys.prefix + '\\scripts\ipython.py -p pysh' if not os.path.isfile(f): create_shortcut(python, 'pysh', f, a) file_created(f) # Create documentation shortcuts ... man_pdf = sys.prefix + '\\share\\doc\\ipython-0.6.6\\manual.pdf' f = d + '\\Manual in PDF.lnk' if not os.path.isfile(f): create_shortcut(man_pdf, 'IPython Manual - PDF-Format', f) file_created(f) man_html = sys.prefix + '\\share\\doc\\ipython-0.6.6\\manual\\manual.html' f = d + '\\Manual in HTML.lnk' if not os.path.isfile(f): create_shortcut(man_html, 'IPython Manual - HTML-Format', f) file_created(f) def remove(): #print("Enter remove().") pass if len(sys.argv) > 1: if sys.argv[1] == '-install': install() elif sys.argv[1] == '-remove': remove() else: print "Script was called with option %s" % sys.argv[1]