From: Kevin A. <ka...@us...> - 2007-07-28 23:13:30
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23489 Modified Files: model.py Log Message: moved required version info to tuples and updated minimum requirements dialog Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.197 retrieving revision 1.198 diff -C2 -d -r1.197 -r1.198 *** model.py 13 Jan 2006 23:33:37 -0000 1.197 --- model.py 28 Jul 2007 23:13:31 -0000 1.198 *************** *** 11,18 **** # if they aren't met try: # some things might work with lesser # versions, but this is a reasonable base ! assert sys.version_info >= (2, 3) # sys.modules relative path fix sys.path[0] = os.path.abspath(sys.path[0]) --- 11,21 ---- # if they aren't met + REQUIRED_PYTHON = (2, 3) + REQUIRED_WXPYTHON = (2, 6) + try: # some things might work with lesser # versions, but this is a reasonable base ! assert sys.version_info >= REQUIRED_PYTHON # sys.modules relative path fix sys.path[0] = os.path.abspath(sys.path[0]) *************** *** 20,34 **** import wx ! assert wx.VERSION >= (2, 5, 2, 8) except AssertionError: ! from wxPython.wx import wxPySimpleApp, wxFrame, wxMessageDialog, wxICON_EXCLAMATION, wxOK, wxVERSION_STRING ! app = wxPySimpleApp() ! frame = wxFrame(None, -1, "Minimum Requirements Not Met") ! #frame.Show(1) ! message = "PythonCard minimum requirements:\nPython 2.3 and wxPython 2.5.2.8\n\n" + \ ! "You are using Python %s\nand wxPython %s.\n\nClick OK to exit." % (sys.version, wxVERSION_STRING) ! dialog = wxMessageDialog(frame, message, "Minimum Requirements Not Met", ! wxICON_EXCLAMATION | wxOK) dialog.ShowModal() dialog.Destroy() --- 23,45 ---- import wx ! assert wx.VERSION >= REQUIRED_WXPYTHON except AssertionError: ! app = wx.PySimpleApp() ! frame = wx.Frame(None, -1, "Minimum Requirements Not Met") ! message = """PythonCard minimum requirements: ! Python %s ! wxPython %s ! ! You are using: ! Python %s ! wxPython %s ! ! Click OK to exit.""" % \ ! (".".join([str(c) for c in REQUIRED_PYTHON]), ! ".".join([str(c) for c in REQUIRED_WXPYTHON]), ! sys.version, wx.VERSION_STRING) ! dialog = wx.MessageDialog(frame, message, "Minimum Requirements Not Met", ! wx.ICON_EXCLAMATION | wx.OK) dialog.ShowModal() dialog.Destroy() |