blob: 4bd0e6200bc72e7155fa99535b125f09d43cee94 [file] [log] [blame]
Jack Jansenffb8fef2003-02-12 15:39:56 +00001# Prelude to allow running this as a main program
2def _init():
3 import macresource
4 import sys, os
5 macresource.need('DITL', 468, "PythonIDE.rsrc")
6 widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
7 widgetresfile = os.path.join(*widgetrespathsegs)
8 if not os.path.exists(widgetresfile):
9 widgetrespathsegs = [os.pardir, "Tools", "IDE", "Widgets.rsrc"]
10 widgetresfile = os.path.join(*widgetrespathsegs)
11 refno = macresource.need('CURS', 468, widgetresfile)
12 if os.environ.has_key('PYTHONIDEPATH'):
13 # For development set this environment variable
14 ide_path = os.environ['PYTHONIDEPATH']
15 elif refno:
16 # We're not a fullblown application
17 idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
18 ide_path = os.path.join(*idepathsegs)
19 if not os.path.exists(ide_path):
20 idepathsegs = [os.pardir, "Tools", "IDE"]
21 for p in sys.path:
22 ide_path = os.path.join(*([p]+idepathsegs))
23 if os.path.exists(ide_path):
24 break
25
26 else:
27 # We are a fully frozen application
28 ide_path = sys.argv[0]
29 if ide_path not in sys.path:
30 sys.path.insert(0, ide_path)
31
32if __name__ == '__main__':
33 _init()
34
Jack Jansen73019a62003-02-11 23:15:33 +000035import W
36import Wapplication
37from Carbon import Evt
38import EasyDialogs
39import FrameWork
40
41import sys
42import string
43import os
Jack Jansen4ab84372003-02-14 14:13:25 +000044import urllib
Jack Jansen73019a62003-02-11 23:15:33 +000045
46import pimp
47
48ELIPSES = '...'
49
Jack Jansena950d7b2003-04-16 12:17:56 +000050USER_INSTALL_DIR = os.path.join(os.environ.get('HOME', ''),
Jack Jansenf776dee2003-04-22 13:53:33 +000051 'Library',
52 'Python',
53 sys.version[:3],
54 'site-packages')
55
Jack Jansen113af982003-02-12 12:47:56 +000056class PackageManagerMain(Wapplication.Application):
Jack Jansen73019a62003-02-11 23:15:33 +000057
58 def __init__(self):
Jack Jansen113af982003-02-12 12:47:56 +000059 self.preffilepath = os.path.join("Python", "Package Install Manager Prefs")
Jack Jansen73019a62003-02-11 23:15:33 +000060 Wapplication.Application.__init__(self, 'Pimp')
61 from Carbon import AE
62 from Carbon import AppleEvents
63
64 AE.AEInstallEventHandler(AppleEvents.kCoreEventClass, AppleEvents.kAEOpenApplication,
65 self.ignoreevent)
66 AE.AEInstallEventHandler(AppleEvents.kCoreEventClass, AppleEvents.kAEReopenApplication,
67 self.ignoreevent)
68 AE.AEInstallEventHandler(AppleEvents.kCoreEventClass, AppleEvents.kAEPrintDocuments,
69 self.ignoreevent)
70 AE.AEInstallEventHandler(AppleEvents.kCoreEventClass, AppleEvents.kAEQuitApplication,
71 self.quitevent)
Jack Jansen113af982003-02-12 12:47:56 +000072 if 1:
Jack Jansen73019a62003-02-11 23:15:33 +000073 import PyConsole
74 # With -D option (OSX command line only) keep stderr, for debugging the IDE
75 # itself.
76 debug_stderr = None
77 if len(sys.argv) >= 2 and sys.argv[1] == '-D':
78 debug_stderr = sys.stderr
79 del sys.argv[1]
80 PyConsole.installoutput()
Jack Jansen73019a62003-02-11 23:15:33 +000081 if debug_stderr:
82 sys.stderr = debug_stderr
83 self.opendoc(None)
84 self.mainloop()
85
86 def makeusermenus(self):
87 m = Wapplication.Menu(self.menubar, "File")
Jack Jansen4ab84372003-02-14 14:13:25 +000088 newitem = FrameWork.MenuItem(m, "Open Standard Database", "N", 'openstandard')
89 openitem = FrameWork.MenuItem(m, "Open"+ELIPSES, "O", 'open')
90 openURLitem = FrameWork.MenuItem(m, "Open URL"+ELIPSES, "D", 'openURL')
Jack Jansen73019a62003-02-11 23:15:33 +000091 FrameWork.Separator(m)
92 closeitem = FrameWork.MenuItem(m, "Close", "W", 'close')
93## saveitem = FrameWork.MenuItem(m, "Save", "S", 'save')
Jack Jansen113af982003-02-12 12:47:56 +000094## saveasitem = FrameWork.MenuItem(m, "Save as"+ELIPSES, None, 'save_as')
Jack Jansen4ab84372003-02-14 14:13:25 +000095## FrameWork.Separator(m)
Jack Jansen73019a62003-02-11 23:15:33 +000096
97 m = Wapplication.Menu(self.menubar, "Edit")
98 undoitem = FrameWork.MenuItem(m, "Undo", 'Z', "undo")
99 FrameWork.Separator(m)
100 cutitem = FrameWork.MenuItem(m, "Cut", 'X', "cut")
101 copyitem = FrameWork.MenuItem(m, "Copy", "C", "copy")
102 pasteitem = FrameWork.MenuItem(m, "Paste", "V", "paste")
103 FrameWork.MenuItem(m, "Clear", None, "clear")
104 FrameWork.Separator(m)
105 selallitem = FrameWork.MenuItem(m, "Select all", "A", "selectall")
106
107 m = Wapplication.Menu(self.menubar, "Package")
108 runitem = FrameWork.MenuItem(m, "Install", "I", 'install')
109 homepageitem = FrameWork.MenuItem(m, "Visit Homepage", None, 'homepage')
110
111 self.openwindowsmenu = Wapplication.Menu(self.menubar, 'Windows')
112 self.makeopenwindowsmenu()
Jack Jansen31fa8452003-05-27 14:10:37 +0000113 self.makehelpmenu()
Jack Jansenffb8fef2003-02-12 15:39:56 +0000114 self._menustocheck = [closeitem,
Jack Jansen73019a62003-02-11 23:15:33 +0000115 undoitem, cutitem, copyitem, pasteitem,
116 selallitem,
117 runitem, homepageitem]
118
Jack Jansen31fa8452003-05-27 14:10:37 +0000119 def makehelpmenu(self):
120 python_app = os.path.join(sys.prefix, 'Resources/Python.app')
121 help_source = os.path.join(python_app, 'Contents/Resources/English.lproj/Documentation')
122 hashelp = os.path.isdir(help_source)
123
124 self.helpmenu = m = self.gethelpmenu()
125 helpitem1 = FrameWork.MenuItem(m, "PackageManager Help", None, self.domenu_packmanhelp)
126 helpitem1.enable(hashelp)
127 helpitem2 = FrameWork.MenuItem(m, "MacPython Help", None, self.domenu_pythonhelp)
128 helpitem2.enable(hashelp)
129
Jack Jansen73019a62003-02-11 23:15:33 +0000130 def quitevent(self, theAppleEvent, theReply):
Jack Jansen73019a62003-02-11 23:15:33 +0000131 self._quit()
132
133 def ignoreevent(self, theAppleEvent, theReply):
134 pass
135
136 def opendocsevent(self, theAppleEvent, theReply):
137 W.SetCursor('watch')
138 import aetools
139 parameters, args = aetools.unpackevent(theAppleEvent)
140 docs = parameters['----']
141 if type(docs) <> type([]):
142 docs = [docs]
143 for doc in docs:
144 fsr, a = doc.FSResolveAlias(None)
145 path = fsr.as_pathname()
146 path = urllib.pathname2url(path)
147 self.opendoc(path)
148
149 def opendoc(self, url):
150 PackageBrowser(url)
151
152 def getabouttext(self):
Jack Jansen113af982003-02-12 12:47:56 +0000153 return "About Package Manager"+ELIPSES
Jack Jansen73019a62003-02-11 23:15:33 +0000154
155 def do_about(self, id, item, window, event):
Jack Jansen113af982003-02-12 12:47:56 +0000156 EasyDialogs.Message("Package Install Manager for Python")
Jack Jansen4ab84372003-02-14 14:13:25 +0000157
158 def domenu_openstandard(self, *args):
159 self.opendoc(None)
160
Jack Jansen73019a62003-02-11 23:15:33 +0000161 def domenu_open(self, *args):
162 filename = EasyDialogs.AskFileForOpen(typeList=("TEXT",))
163 if filename:
164 filename = urllib.pathname2url(filename)
165 self.opendoc(filename)
Jack Jansen4ab84372003-02-14 14:13:25 +0000166
167 def domenu_openURL(self, *args):
168 ok = EasyDialogs.AskYesNoCancel(
169 "Warning: by opening a non-standard database "
170 "you are trusting the maintainer of it "
171 "to run arbitrary code on your machine.",
172 yes="OK", no="")
173 if ok <= 0: return
174 url = EasyDialogs.AskString("URL of database to open:", ok="Open")
175 if url:
176 self.opendoc(url)
Jack Jansen73019a62003-02-11 23:15:33 +0000177
178 def domenu_openbyname(self, *args):
179 url = EasyDialogs.AskString("Open URL:", ok="Open")
180 if url:
181 self.opendoc(url)
182
183 def makeopenwindowsmenu(self):
184 for i in range(len(self.openwindowsmenu.items)):
185 self.openwindowsmenu.menu.DeleteMenuItem(1)
186 self.openwindowsmenu.items = []
187 windows = []
188 self._openwindows = {}
189 for window in self._windows.keys():
190 title = window.GetWTitle()
191 if not title:
192 title = "<no title>"
193 windows.append((title, window))
194 windows.sort()
195 for title, window in windows:
196 shortcut = None
197 item = FrameWork.MenuItem(self.openwindowsmenu, title, shortcut, callback = self.domenu_openwindows)
198 self._openwindows[item.item] = window
199 self._openwindowscheckmark = 0
200 self.checkopenwindowsmenu()
201
202 def domenu_openwindows(self, id, item, window, event):
203 w = self._openwindows[item]
204 w.ShowWindow()
205 w.SelectWindow()
206
207 def domenu_quit(self):
208 self._quit()
209
210 def domenu_save(self, *args):
211 print "Save"
212
Jack Jansen31fa8452003-05-27 14:10:37 +0000213 def domenu_pythonhelp(self, *args):
214 from Carbon import AH
215 AH.AHGotoPage("MacPython Help", None, None)
216
217 def domenu_packmanhelp(self, *args):
218 from Carbon import AH
219 AH.AHGotoPage("MacPython Help", "packman.html", None)
220
Jack Jansen73019a62003-02-11 23:15:33 +0000221 def _quit(self):
222## import PyConsole, PyEdit
223 for window in self._windows.values():
224 try:
225 rv = window.close() # ignore any errors while quitting
226 except:
Jack Jansenf776dee2003-04-22 13:53:33 +0000227 rv = 0 # (otherwise, we can get stuck!)
Jack Jansen73019a62003-02-11 23:15:33 +0000228 if rv and rv > 0:
229 return
230## try:
231## PyConsole.console.writeprefs()
232## PyConsole.output.writeprefs()
233## PyEdit.searchengine.writeprefs()
234## except:
235## # Write to __stderr__ so the msg end up in Console.app and has
236## # at least _some_ chance of getting read...
237## # But: this is a workaround for way more serious problems with
238## # the Python 2.2 Jaguar addon.
239## sys.__stderr__.write("*** PythonIDE: Can't write preferences ***\n")
240 self.quitting = 1
241
242class PimpInterface:
243
244 def setuppimp(self, url):
245 self.pimpprefs = pimp.PimpPreferences()
246 self.pimpdb = pimp.PimpDatabase(self.pimpprefs)
247 if not url:
248 url = self.pimpprefs.pimpDatabase
Jack Jansen4ab84372003-02-14 14:13:25 +0000249 try:
250 self.pimpdb.appendURL(url)
251 except IOError, arg:
Jack Jansen36b51982003-04-16 12:40:21 +0000252 rv = "Cannot open %s: %s\n" % (url, arg)
253 rv += "\nSee MacPython Package Manager help page."
254 return rv
Jack Jansena7203d12003-07-21 22:03:14 +0000255 except:
256 rv = "Unspecified error while parsing database: %s\n" % url
257 rv += "Usually, this means the database is not correctly formatted.\n"
258 rv += "\nSee MacPython Package Manager help page."
259 return rv
Jack Jansena950d7b2003-04-16 12:17:56 +0000260 # Check whether we can write the installation directory.
261 # If not, set to the per-user directory, possibly
262 # creating it, if needed.
263 installDir = self.pimpprefs.installDir
264 if not os.access(installDir, os.R_OK|os.W_OK|os.X_OK):
265 rv = self.setuserinstall(1)
266 if rv: return rv
Jack Jansend5532af2003-02-28 15:19:51 +0000267 return self.pimpprefs.check()
Jack Jansen4ab84372003-02-14 14:13:25 +0000268
269 def closepimp(self):
270 self.pimpdb.close()
271 self.pimpprefs = None
272 self.pimpdb = None
Jack Jansen4ab84372003-02-14 14:13:25 +0000273 self.packages = []
Jack Jansen73019a62003-02-11 23:15:33 +0000274
Jack Jansena950d7b2003-04-16 12:17:56 +0000275 def setuserinstall(self, onoff):
276 rv = ""
277 if onoff:
278 if not os.path.exists(USER_INSTALL_DIR):
279 try:
280 os.makedirs(USER_INSTALL_DIR)
281 except OSError, arg:
282 rv = rv + arg + "\n"
283 if not USER_INSTALL_DIR in sys.path:
284 import site
285 reload(site)
286 self.pimpprefs.setInstallDir(USER_INSTALL_DIR)
287 else:
288 self.pimpprefs.setInstallDir(None)
289 rv = rv + self.pimpprefs.check()
290 return rv
291
292 def getuserinstall(self):
293 return self.pimpprefs.installDir == USER_INSTALL_DIR
294
295 def getbrowserdata(self, show_hidden=1):
Jack Jansenf776dee2003-04-22 13:53:33 +0000296 packages = self.pimpdb.list()
297 if show_hidden:
298 self.packages = packages
299 else:
300 self.packages = []
301 for pkg in packages:
302 name = pkg.fullname()
303 if name[0] == '(' and name[-1] == ')' and not show_hidden:
304 continue
305 self.packages.append(pkg)
Jack Jansen73019a62003-02-11 23:15:33 +0000306 rv = []
307 for pkg in self.packages:
308 name = pkg.fullname()
309 status, _ = pkg.installed()
310 description = pkg.description()
Jack Jansen9f0c5752003-05-29 22:07:27 +0000311 description_line1 = description.split('\n')[0]
312 rv.append((status, name, description_line1))
Jack Jansen73019a62003-02-11 23:15:33 +0000313 return rv
314
315 def getstatus(self, number):
316 pkg = self.packages[number]
317 return pkg.installed()
Jack Jansen113af982003-02-12 12:47:56 +0000318
Jack Jansena950d7b2003-04-16 12:17:56 +0000319 def installpackage(self, sel, output, recursive, force):
Jack Jansen113af982003-02-12 12:47:56 +0000320 pkg = self.packages[sel]
Jack Jansen40b2e832003-07-21 22:11:07 +0000321 pimpinstaller = pimp.PimpInstaller(self.pimpdb)
322 list, messages = pimpinstaller.prepareInstall(pkg, force, recursive)
Jack Jansen113af982003-02-12 12:47:56 +0000323 if messages:
324 return messages
Jack Jansen40b2e832003-07-21 22:11:07 +0000325 messages = pimpinstaller.install(list, output)
Jack Jansen113af982003-02-12 12:47:56 +0000326 return messages
Jack Jansen73019a62003-02-11 23:15:33 +0000327
328class PackageBrowser(PimpInterface):
329
330 def __init__(self, url = None):
331 self.ic = None
Jack Jansena950d7b2003-04-16 12:17:56 +0000332 messages = self.setuppimp(url)
Jack Jansen73019a62003-02-11 23:15:33 +0000333 self.setupwidgets()
334 self.updatestatus()
Jack Jansena950d7b2003-04-16 12:17:56 +0000335 self.showmessages(messages)
Jack Jansen4ab84372003-02-14 14:13:25 +0000336
337 def close(self):
338 self.closepimp()
Jack Jansen73019a62003-02-11 23:15:33 +0000339
Jack Jansen43230902003-04-15 21:59:42 +0000340 def setupwidgets(self):
Jack Jansen9f0c5752003-05-29 22:07:27 +0000341 DESCRIPTION_HEIGHT = 140
Jack Jansen43230902003-04-15 21:59:42 +0000342 INSTALL_POS = -30
Jack Jansen9f0c5752003-05-29 22:07:27 +0000343 STATUS_POS = INSTALL_POS - (70 + DESCRIPTION_HEIGHT)
344 self.w = W.Window((580, 600), "Python Install Manager", minsize = (400, 400), tabbable = 0)
Jack Jansena950d7b2003-04-16 12:17:56 +0000345 self.w.titlebar = W.TextBox((4, 8, 60, 18), 'Packages:')
346 self.w.hidden_button = W.CheckBox((-100, 4, 0, 18), 'Show Hidden', self.updatestatus)
Jack Jansen73019a62003-02-11 23:15:33 +0000347 data = self.getbrowserdata()
Jack Jansena950d7b2003-04-16 12:17:56 +0000348 self.w.packagebrowser = W.MultiList((4, 24, 0, STATUS_POS-2), data, self.listhit, cols=3)
Jack Jansen43230902003-04-15 21:59:42 +0000349
Jack Jansen9f0c5752003-05-29 22:07:27 +0000350 self.w.installed_l = W.TextBox((4, STATUS_POS, 70, 12), 'Installed:')
351 self.w.installed = W.TextBox((74, STATUS_POS, 0, 12), '')
352 self.w.message_l = W.TextBox((4, STATUS_POS+20, 70, 12), 'Status:')
353 self.w.message = W.TextBox((74, STATUS_POS+20, 0, 12), '')
Jack Jansen43230902003-04-15 21:59:42 +0000354 self.w.homepage_button = W.Button((4, STATUS_POS+40, 96, 18), 'View homepage', self.do_homepage)
Jack Jansen9f0c5752003-05-29 22:07:27 +0000355 self.w.description_l = W.TextBox((4, STATUS_POS+70, 70, 12), 'Description:')
356 self.w.description = W.EditText((74, STATUS_POS+70, 0, DESCRIPTION_HEIGHT-4))
Jack Jansen43230902003-04-15 21:59:42 +0000357
Jack Jansena950d7b2003-04-16 12:17:56 +0000358 self.w.divline = W.HorizontalLine((0, INSTALL_POS-4, 0, 0))
359 self.w.verbose_button = W.CheckBox((84, INSTALL_POS+4, 60, 18), 'Verbose')
360 self.w.recursive_button = W.CheckBox((146, INSTALL_POS+4, 120, 18), 'Install dependencies', self.updatestatus)
Jack Jansen113af982003-02-12 12:47:56 +0000361 self.w.recursive_button.set(1)
Jack Jansena950d7b2003-04-16 12:17:56 +0000362 self.w.force_button = W.CheckBox((268, INSTALL_POS+4, 70, 18), 'Overwrite', self.updatestatus)
363 self.w.user_button = W.CheckBox((340, INSTALL_POS+4, 140, 18), 'For Current User Only', self.do_user)
364 self.w.install_button = W.Button((4, INSTALL_POS+4, 56, 18), 'Install:', self.do_install)
Jack Jansen73019a62003-02-11 23:15:33 +0000365 self.w.open()
Jack Jansen9f0c5752003-05-29 22:07:27 +0000366 self.w.description.enable(0)
Jack Jansen73019a62003-02-11 23:15:33 +0000367
368 def updatestatus(self):
Jack Jansend48364e2003-11-19 13:45:26 +0000369 topcell = self.w.packagebrowser.gettopcell()
Jack Jansen73019a62003-02-11 23:15:33 +0000370 sel = self.w.packagebrowser.getselection()
Jack Jansena950d7b2003-04-16 12:17:56 +0000371 data = self.getbrowserdata(self.w.hidden_button.get())
Jack Jansen113af982003-02-12 12:47:56 +0000372 self.w.packagebrowser.setitems(data)
Jack Jansena950d7b2003-04-16 12:17:56 +0000373 self.w.user_button.set(self.getuserinstall())
Jack Jansen73019a62003-02-11 23:15:33 +0000374 if len(sel) != 1:
375 self.w.installed.set('')
376 self.w.message.set('')
377 self.w.install_button.enable(0)
378 self.w.homepage_button.enable(0)
Jack Jansen9f0c5752003-05-29 22:07:27 +0000379 self.w.description.set('')
Jack Jansen73019a62003-02-11 23:15:33 +0000380 self.w.verbose_button.enable(0)
Jack Jansen113af982003-02-12 12:47:56 +0000381 self.w.recursive_button.enable(0)
Jack Jansen73019a62003-02-11 23:15:33 +0000382 self.w.force_button.enable(0)
Jack Jansen43230902003-04-15 21:59:42 +0000383 self.w.user_button.enable(0)
Jack Jansen73019a62003-02-11 23:15:33 +0000384 else:
385 sel = sel[0]
Jack Jansenac5d6672003-11-27 23:19:33 +0000386 if sel >= len(self.packages):
387 sel = 0
Jack Jansen113af982003-02-12 12:47:56 +0000388 self.w.packagebrowser.setselection([sel])
Jack Jansen73019a62003-02-11 23:15:33 +0000389 installed, message = self.getstatus(sel)
390 self.w.installed.set(installed)
391 self.w.message.set(message)
392 self.w.install_button.enable(installed != "yes" or self.w.force_button.get())
393 self.w.homepage_button.enable(not not self.packages[sel].homepage())
Jack Jansen9f0c5752003-05-29 22:07:27 +0000394 description = self.packages[sel].description()
Jack Jansen2a97dcc2003-06-01 20:03:43 +0000395 description = description.splitlines()
Jack Jansen9f0c5752003-05-29 22:07:27 +0000396 description = '\r'.join(description)
397 self.w.description.set(description)
Jack Jansen73019a62003-02-11 23:15:33 +0000398 self.w.verbose_button.enable(1)
Jack Jansen113af982003-02-12 12:47:56 +0000399 self.w.recursive_button.enable(1)
Jack Jansen73019a62003-02-11 23:15:33 +0000400 self.w.force_button.enable(1)
Jack Jansena950d7b2003-04-16 12:17:56 +0000401 self.w.user_button.enable(1)
Jack Jansend48364e2003-11-19 13:45:26 +0000402 self.w.packagebrowser.settopcell(topcell)
Jack Jansen73019a62003-02-11 23:15:33 +0000403
404 def listhit(self, *args, **kwargs):
405 self.updatestatus()
406
407 def do_install(self):
Jack Jansen113af982003-02-12 12:47:56 +0000408 sel = self.w.packagebrowser.getselection()[0]
409 if self.w.verbose_button.get():
410 output = sys.stdout
411 else:
412 output = None
413 recursive = self.w.recursive_button.get()
414 force = self.w.force_button.get()
Jack Jansena950d7b2003-04-16 12:17:56 +0000415 messages = self.installpackage(sel, output, recursive, force)
416
417 # Re-read .pth files
418 import site
419 reload(site)
420
Jack Jansen113af982003-02-12 12:47:56 +0000421 self.updatestatus()
Jack Jansena950d7b2003-04-16 12:17:56 +0000422 self.showmessages(messages)
423
424 def showmessages(self, messages):
Jack Jansen113af982003-02-12 12:47:56 +0000425 if messages:
Jack Jansen9cc4fcd2003-11-27 23:12:17 +0000426 # To be on the safe side we always show the hidden packages,
427 # they may be referred to in the error messages.
428 if not self.w.hidden_button.get():
429 self.w.hidden_button.set(1)
430 self.updatestatus()
Jack Jansena950d7b2003-04-16 12:17:56 +0000431 if type(messages) == list:
432 messages = '\n'.join(messages)
433 if self.w.verbose_button.get():
434 sys.stdout.write(messages + '\n')
435 EasyDialogs.Message(messages)
Jack Jansen73019a62003-02-11 23:15:33 +0000436
437 def do_homepage(self):
438 sel = self.w.packagebrowser.getselection()[0]
439 if not self.ic:
440 import ic
441
442 self.ic = ic.IC()
443 self.ic.launchurl(self.packages[sel].homepage())
444
Jack Jansena950d7b2003-04-16 12:17:56 +0000445 def do_user(self):
446 messages = self.setuserinstall(self.w.user_button.get())
447 self.updatestatus()
448 self.showmessages(messages)
449
Jack Jansen73019a62003-02-11 23:15:33 +0000450if __name__ == '__main__':
Jack Jansen113af982003-02-12 12:47:56 +0000451 PackageManagerMain()