annotate Mac/scripts/ConfigurePython.py @ 3217:801265b86164 legacy-trunk

Added imgpbm and imgsgi
author Jack Jansen <jack.jansen@cwi.nl>
date Thu, 12 Oct 1995 10:34:31 +0000
parents 61ca19a3000f
children 3a0f84c69050
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1 # This python script creates Finder aliases for all the
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2 # dynamically-loaded modules that "live in" in a single
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3 # shared library.
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4 # It needs a fully functional non-dynamic python to work
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5 # (since it creates aliases to stuff it needs itself),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6 # you should probably drag it onto your non-dynamic python.
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7 #
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8 # If you compare it to MkPluginAliases.as it also serves
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9 # as a comparison between python and AppleScript:-)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
10 #
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
11 # Jack Jansen, CWI, August 1995
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
12
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
13 import sys
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14
3122
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
15 def help():
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
16 print"""
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
17 Try the following:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
18 1. Remove any old "Python Preferences" files from the system folder.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
19 2. Remove any old "PythonCore" files from the system folder.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
20 3. Make sure this script, PythonPPC and PythonCore are all located in the
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
21 python home folder (where the Lib and PlugIns folders are)
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
22 4. Run this script again, by dropping it on PythonPPC.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
23
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
24 If this fails try removing starting afresh from the distribution archive.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
25 """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
26 sys.exit(1)
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
27
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
28 try:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
29 import os
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
30 except ImportError:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
31 print """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
32 I cannot import the 'os' module, so something is wrong with sys.path
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
33 """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
34 help()
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
35
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
36 try:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 import Res
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 except ImportError:
3122
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
39 #
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
40 # Check that we are actually in the main python directory
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
41 #
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
42 try:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
43 os.chdir(':PlugIns')
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
44 except IOError:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
45 print """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
46 I cannot find the 'PlugIns' folder, so I am obviously not run from the Python
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
47 home folder.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
48 """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
49 help()
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
50 import imp
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
51 cwd = os.getcwd()
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
52 tblibname = os.path.join(cwd, "toolboxmodules.slb")
3183
61ca19a3000f Adapted to os and imp changes
Jack Jansen <jack.jansen@cwi.nl>
parents: 3122
diff changeset
53 if not os.path.exists(tblibname):
3122
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
54 print """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
55 I cannot find the 'toolboxmodules.slb' file in the PlugIns directory.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
56 Start afresh from a clean distribution.
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
57 """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
58 sys.exit(1)
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
59 try:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
60 for wtd in ["Ctl", "Dlg", "Evt", "Qd", "Res", "Win"]:
3183
61ca19a3000f Adapted to os and imp changes
Jack Jansen <jack.jansen@cwi.nl>
parents: 3122
diff changeset
61 imp.load_dynamic(wtd, tblibname)
3122
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
62 except ImportError:
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
63 print """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
64 I cannot load the toolbox modules by hand. Are you sure you are
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
65 using a PowerPC mac?
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
66 """
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
67 sys.exit(1)
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
68
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
69
3122
2caa3e283568 Load toolbox modules "by hand" using imp, so this script should now
Jack Jansen <jack.jansen@cwi.nl>
parents: 2978
diff changeset
70 import macfs
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
71 import EasyDialogs
2978
7a67dbcb6d83 Added List.slb alias
Jack Jansen <jack.jansen@cwi.nl>
parents: 2939
diff changeset
72 import macostools
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
73
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
74 goals = [
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75 ("mactcp.slb", "mactcpmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
76 ("macdnr.slb", "mactcpmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
77 ("AE.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
78 ("Ctl.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
79 ("Dlg.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
80 ("Evt.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
81 ("Menu.slb", "toolboxmodules.slb"),
2978
7a67dbcb6d83 Added List.slb alias
Jack Jansen <jack.jansen@cwi.nl>
parents: 2939
diff changeset
82 ("List.slb", "toolboxmodules.slb"),
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
83 ("Qd.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
84 ("Res.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
85 ("Snd.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
86 ("Win.slb", "toolboxmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
87 ("imgcolormap.slb", "imgmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
88 ("imgformat.slb", "imgmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
89 ("imggif.slb", "imgmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
90 ("imgjpeg.slb", "imgmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
91 ("imgop.slb", "imgmodules.slb"),
3217
801265b86164 Added imgpbm and imgsgi
Jack Jansen <jack.jansen@cwi.nl>
parents: 3183
diff changeset
92 ("imgpbm.slb", "imgmodules.slb"),
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
93 ("imgpgm.slb", "imgmodules.slb"),
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
94 ("imgppm.slb", "imgmodules.slb"),
3217
801265b86164 Added imgpbm and imgsgi
Jack Jansen <jack.jansen@cwi.nl>
parents: 3183
diff changeset
95 ("imgtiff.slb", "imgmodules.slb"),
801265b86164 Added imgpbm and imgsgi
Jack Jansen <jack.jansen@cwi.nl>
parents: 3183
diff changeset
96 ("imgsgi.slb", "imgmodules.slb")
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
97 ]
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
99
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
100 def main():
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
101 # Ask the user for the plugins directory
2978
7a67dbcb6d83 Added List.slb alias
Jack Jansen <jack.jansen@cwi.nl>
parents: 2939
diff changeset
102 dir, ok = macfs.GetDirectory('Where is the PlugIns folder?')
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
103 if not ok: sys.exit(0)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
104 os.chdir(dir.as_pathname())
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
105
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
106 # Remove old .slb aliases and collect a list of .slb files
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107 if EasyDialogs.AskYesNoCancel('Proceed with removing old aliases?') <= 0:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
108 sys.exit(0)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
109 LibFiles = []
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
110 allfiles = os.listdir(':')
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
111 for f in allfiles:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
112 if f[-4:] == '.slb':
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
113 finfo = macfs.FSSpec(f).GetFInfo()
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
114 if finfo.Flags & 0x8000:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
115 os.unlink(f)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
116 else:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
117 LibFiles.append(f)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
119 print LibFiles
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120 # Create the new aliases.
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
121 if EasyDialogs.AskYesNoCancel('Proceed with creating new ones?') <= 0:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
122 sys.exit(0)
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
123 for dst, src in goals:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
124 if src in LibFiles:
2978
7a67dbcb6d83 Added List.slb alias
Jack Jansen <jack.jansen@cwi.nl>
parents: 2939
diff changeset
125 macostools.mkalias(src, dst)
2939
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
126 else:
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
127 EasyDialogs.Message(dst+' not created: '+src+' not found')
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
129 EasyDialogs.Message('All done!')
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
130
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
131 if __name__ == '__main__':
4dfdf234cda8 MkPluginAliases - Scripts (AppleScript and Python) to create aliases
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
132 main()