[Python-checkins] CVS: python/dist/src/Mac/Demo/example1 dnslookup-1.py,1.3,1.4

Jack Jansen jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 14:41:19 -0700


Update of /cvsroot/python/python/dist/src/Mac/Demo/example1
In directory usw-pr-cvs1:/tmp/cvs-serv5739/Python/Mac/Demo/example1

Modified Files:
	dnslookup-1.py 
Log Message:
Use the new macresource module to open the accompanying resource file (if needed).

Index: dnslookup-1.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/example1/dnslookup-1.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dnslookup-1.py	2001/08/25 12:03:48	1.3
--- dnslookup-1.py	2001/08/27 21:41:16	1.4
***************
*** 8,11 ****
--- 8,12 ----
  import socket
  import string
+ import macresource
  #
  # Definitions for our resources
***************
*** 16,28 ****
  ITEM_LOOKUP_BUTTON=3
  ITEM_QUIT_BUTTON=4
!     
!             
  def main():
      """Main routine: open resource file, call dialog handler"""
!     try:
!         Res.FSpOpenResFile("dnslookup-1.rsrc", 1)
!     except Res.Error:
!         EasyDialogs.Message("Cannot open dnslookup-1.rsrc")
!         sys.exit(1) 
      do_dialog()
  
--- 17,24 ----
  ITEM_LOOKUP_BUTTON=3
  ITEM_QUIT_BUTTON=4
! 
  def main():
      """Main routine: open resource file, call dialog handler"""
!     macresource.need("DLOG", ID_MAIN, "dnslookup-1.rsrc")
      do_dialog()