[Spambayes-checkins] spambayes/Outlook2000/dialogs ManagerDialog.py,1.8,1.9

Mark Hammond mhammond@users.sourceforge.net
Wed Nov 27 05:50:00 2002


Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv29012/dialogs

Modified Files:
	ManagerDialog.py 
Log Message:
First steps to stand-alone filter - check sys.frozen, and use sys.argv[0]
rather than __file__ to determine where we are.  Apparently this will work
with Gordon's installer <wink>


Index: ManagerDialog.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/ManagerDialog.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ManagerDialog.py	7 Nov 2002 22:30:10 -0000	1.8
--- ManagerDialog.py	27 Nov 2002 05:49:56 -0000	1.9
***************
*** 1,3 ****
! import os
  import operator
  
--- 1,3 ----
! import os, sys
  import operator
  
***************
*** 156,165 ****
      def OnButAbout(self, id, code):
          if code == win32con.BN_CLICKED:
! 
!             fname = os.path.join(os.path.dirname(__file__),
!                                  os.pardir,
!                                  "about.html")
              fname = os.path.abspath(fname)
-             print fname
              if os.path.isfile(fname):
                  win32ui.DoWaitCursor(1)
--- 156,169 ----
      def OnButAbout(self, id, code):
          if code == win32con.BN_CLICKED:
!             if hasattr(sys, "frozen"):
!                 # Same directory as to the executable.
!                 fname = os.path.join(os.path.dirname(sys.argv[0]),
!                                      "about.html")
!             else:
!                 # In the parent (ie, main Outlook2000) dir
!                 fname = os.path.join(os.path.dirname(__file__),
!                                      os.pardir,
!                                      "about.html")
              fname = os.path.abspath(fname)
              if os.path.isfile(fname):
                  win32ui.DoWaitCursor(1)





More information about the Spambayes-checkins mailing list