[Python-checkins] python/dist/src/Mac/scripts BuildApplet.py,1.16,1.17 BuildApplication.py,1.9,1.10 MkDistr_ui.py,1.14,1.15
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Wed, 22 Jan 2003 06:03:15 -0800
Update of /cvsroot/python/python/dist/src/Mac/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv22883
Modified Files:
BuildApplet.py BuildApplication.py MkDistr_ui.py
Log Message:
Getting rid of StandardGetFile
Index: BuildApplet.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/scripts/BuildApplet.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** BuildApplet.py 15 Nov 2002 00:08:29 -0000 1.16
--- BuildApplet.py 22 Jan 2003 14:03:11 -0000 1.17
***************
*** 36,43 ****
if not sys.argv[1:]:
! srcfss, ok = macfs.PromptGetFile('Select Python source or applet:', 'TEXT', 'APPL')
! if not ok:
return
- filename = srcfss.as_pathname()
tp, tf = os.path.split(filename)
if tf[-3:] == '.py':
--- 36,43 ----
if not sys.argv[1:]:
! filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:',
! fileTypes=('TEXT', 'APPL'))
! if not filename:
return
tp, tf = os.path.split(filename)
if tf[-3:] == '.py':
***************
*** 45,51 ****
else:
tf = tf + '.applet'
! dstfss, ok = macfs.StandardPutFile('Save application as:', tf)
! if not ok: return
! dstfilename = dstfss.as_pathname()
cr, tp = MacOS.GetCreatorAndType(filename)
if tp == 'APPL':
--- 45,51 ----
else:
tf = tf + '.applet'
! dstfilename = EasyDialogs.AskFileForSave(message='Save application as:',
! savedFileName=tf)
! if not dstfilename: return
cr, tp = MacOS.GetCreatorAndType(filename)
if tp == 'APPL':
Index: BuildApplication.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/scripts/BuildApplication.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** BuildApplication.py 27 Aug 2001 21:40:27 -0000 1.9
--- BuildApplication.py 22 Jan 2003 14:03:11 -0000 1.10
***************
*** 13,17 ****
import string
import os
- import macfs
import MacOS
from Carbon import Res
--- 13,16 ----
***************
*** 55,62 ****
if not sys.argv[1:]:
! srcfss, ok = macfs.PromptGetFile('Select Python source:', 'TEXT')
! if not ok:
return
- filename = srcfss.as_pathname()
else:
if sys.argv[2:]:
--- 54,61 ----
if not sys.argv[1:]:
! filename = EasyDialogs.AskFileForOpen(message='Select Python source:',
! fileTypes=('TEXT',))
! if not filename:
return
else:
if sys.argv[2:]:
***************
*** 74,81 ****
tf = tf + '.app'
! dstfss, ok = macfs.StandardPutFile('Save application as:', tf)
if not ok:
return
- dstfilename = dstfss.as_pathname()
macgen_bin.generate(filename, dstfilename, None, architecture, 1)
--- 73,80 ----
tf = tf + '.app'
! dstfilename = EasyDialogs.AskFileForSate(message='Save application as:',
! savedFileName=tf)
if not ok:
return
macgen_bin.generate(filename, dstfilename, None, architecture, 1)
Index: MkDistr_ui.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/scripts/MkDistr_ui.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** MkDistr_ui.py 27 Aug 2001 21:39:29 -0000 1.14
--- MkDistr_ui.py 22 Jan 2003 14:03:12 -0000 1.15
***************
*** 21,25 ****
from FrameWork import *
import EasyDialogs
- import macfs
import os
import sys
--- 21,24 ----
***************
*** 305,313 ****
sys.exit(0)
if rv == DTYPE_EXIST:
! ## macfs.SetFolder(':(MkDistr)')
! fss, ok = macfs.StandardGetFile('TEXT')
! if not ok:
sys.exit(0)
- path = fss.as_pathname()
basename = os.path.split(path)[-1]
if basename[-8:] <> '.include':
--- 304,310 ----
sys.exit(0)
if rv == DTYPE_EXIST:
! path = EasyDialogs.AskFileForOpen()
! if not path:
sys.exit(0)
basename = os.path.split(path)[-1]
if basename[-8:] <> '.include':