mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Getting rid of StandardGetFile
This commit is contained in:
parent
96bf0d75e2
commit
d44a3ec63c
3 changed files with 13 additions and 17 deletions
|
@ -12,7 +12,6 @@ import sys
|
|||
|
||||
import string
|
||||
import os
|
||||
import macfs
|
||||
import MacOS
|
||||
from Carbon import Res
|
||||
from Carbon import Dlg
|
||||
|
@ -54,10 +53,10 @@ def buildapplication(debug = 0):
|
|||
# Ask for source text if not specified in sys.argv[1:]
|
||||
|
||||
if not sys.argv[1:]:
|
||||
srcfss, ok = macfs.PromptGetFile('Select Python source:', 'TEXT')
|
||||
if not ok:
|
||||
filename = EasyDialogs.AskFileForOpen(message='Select Python source:',
|
||||
fileTypes=('TEXT',))
|
||||
if not filename:
|
||||
return
|
||||
filename = srcfss.as_pathname()
|
||||
else:
|
||||
if sys.argv[2:]:
|
||||
raise buildtools.BuildError, "please select one file at a time"
|
||||
|
@ -73,10 +72,10 @@ def buildapplication(debug = 0):
|
|||
else:
|
||||
tf = tf + '.app'
|
||||
|
||||
dstfss, ok = macfs.StandardPutFile('Save application as:', tf)
|
||||
dstfilename = EasyDialogs.AskFileForSate(message='Save application as:',
|
||||
savedFileName=tf)
|
||||
if not ok:
|
||||
return
|
||||
dstfilename = dstfss.as_pathname()
|
||||
|
||||
macgen_bin.generate(filename, dstfilename, None, architecture, 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue