[Python-checkins] CVS: python/dist/src/Mac/Demo/PICTbrowse PICTbrowse2.py,1.9,1.10
Jack Jansen
jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 14:40:36 -0700
Update of /cvsroot/python/python/dist/src/Mac/Demo/PICTbrowse
In directory usw-pr-cvs1:/tmp/cvs-serv5335/Python/Mac/Demo/PICTbrowse
Modified Files:
PICTbrowse2.py
Log Message:
Use the new macresource module to open the accompanying resource file (if needed).
Index: PICTbrowse2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/PICTbrowse/PICTbrowse2.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PICTbrowse2.py 2001/08/25 12:08:44 1.9
--- PICTbrowse2.py 2001/08/27 21:40:34 1.10
***************
*** 10,13 ****
--- 10,14 ----
import sys
import struct
+ import macresource
#
***************
*** 26,37 ****
def main():
! try:
! dummy = Res.GetResource('DLOG', ID_MAIN)
! except Res.Error:
! try:
! Res.FSpOpenResFile("PICTbrowse.rsrc", 1)
! except Res.Error, arg:
! EasyDialogs.Message("Cannot open PICTbrowse.rsrc: "+arg[1])
! sys.exit(1)
PICTbrowse()
--- 27,31 ----
def main():
! macresource.need('DLOG', ID_MAIN, "PICTbrowse.rsrc")
PICTbrowse()