mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Don't call MacOS.SchedParams() in MachO, it doesn't exist.
This commit is contained in:
parent
a48d4eaddf
commit
eb30843ea4
1 changed files with 8 additions and 4 deletions
|
@ -418,6 +418,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
|
||||||
d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
|
d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
|
||||||
d.GetDialogWindow().ShowWindow()
|
d.GetDialogWindow().ShowWindow()
|
||||||
d.DrawDialog()
|
d.DrawDialog()
|
||||||
|
if hasattr(MacOS, 'SchedParams'):
|
||||||
appsw = MacOS.SchedParams(1, 0)
|
appsw = MacOS.SchedParams(1, 0)
|
||||||
try:
|
try:
|
||||||
while 1:
|
while 1:
|
||||||
|
@ -522,6 +523,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
|
||||||
newlist.append(item)
|
newlist.append(item)
|
||||||
return newlist
|
return newlist
|
||||||
finally:
|
finally:
|
||||||
|
if hasattr(MacOS, 'SchedParams'):
|
||||||
apply(MacOS.SchedParams, appsw)
|
apply(MacOS.SchedParams, appsw)
|
||||||
del d
|
del d
|
||||||
|
|
||||||
|
@ -550,6 +552,7 @@ def test():
|
||||||
"So far, so good!", "Keep on truckin'" )
|
"So far, so good!", "Keep on truckin'" )
|
||||||
bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
|
bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
|
||||||
try:
|
try:
|
||||||
|
if hasattr(MacOS, 'SchedParams'):
|
||||||
appsw = MacOS.SchedParams(1, 0)
|
appsw = MacOS.SchedParams(1, 0)
|
||||||
for i in xrange(20):
|
for i in xrange(20):
|
||||||
bar.inc()
|
bar.inc()
|
||||||
|
@ -564,6 +567,7 @@ def test():
|
||||||
time.sleep(1.0) # give'em a chance to see "Done."
|
time.sleep(1.0) # give'em a chance to see "Done."
|
||||||
finally:
|
finally:
|
||||||
del bar
|
del bar
|
||||||
|
if hasattr(MacOS, 'SchedParams'):
|
||||||
apply(MacOS.SchedParams, appsw)
|
apply(MacOS.SchedParams, appsw)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue