mirror of https://github.com/python/cpython.git
Fixes for the Mac. (Jack)
This commit is contained in:
parent
a5e9fb6a65
commit
9d9af2c7a8
|
@ -667,7 +667,11 @@ def __init__(self, screenName=None, baseName=None, className='Tk'):
|
||||||
try:
|
try:
|
||||||
# Disable event scanning except for Command-Period
|
# Disable event scanning except for Command-Period
|
||||||
import MacOS
|
import MacOS
|
||||||
MacOS.EnableAppswitch(0)
|
try:
|
||||||
|
MacOS.SchedParams(1, 0)
|
||||||
|
except AttributeError:
|
||||||
|
# pre-1.5, use old routine
|
||||||
|
MacOS.EnableAppswitch(0)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -28,8 +28,11 @@ def strftest(now):
|
||||||
|
|
||||||
jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6))
|
jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6))
|
||||||
|
|
||||||
if now[8]: tz = time.tzname[1]
|
try:
|
||||||
else: tz = time.tzname[0]
|
if now[8]: tz = time.tzname[1]
|
||||||
|
else: tz = time.tzname[0]
|
||||||
|
except AttributeError:
|
||||||
|
tz = ''
|
||||||
|
|
||||||
if now[3] > 12: clock12 = now[3] - 12
|
if now[3] > 12: clock12 = now[3] - 12
|
||||||
elif now[3] > 0: clock12 = now[3]
|
elif now[3] > 0: clock12 = now[3]
|
||||||
|
@ -66,7 +69,6 @@ def strftest(now):
|
||||||
'%m/%d/%y %H:%M:%S'),
|
'%m/%d/%y %H:%M:%S'),
|
||||||
('%Y', '%d' % now[0], 'year with century'),
|
('%Y', '%d' % now[0], 'year with century'),
|
||||||
('%y', '%02d' % (now[0]%100), 'year without century'),
|
('%y', '%02d' % (now[0]%100), 'year without century'),
|
||||||
('%Z', tz, 'time zone name'),
|
|
||||||
('%%', '%', 'single percent sign'),
|
('%%', '%', 'single percent sign'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -80,6 +82,7 @@ def strftest(now):
|
||||||
'year without century rendered using fieldwidth'),
|
'year without century rendered using fieldwidth'),
|
||||||
('%n', '\n', 'newline character'),
|
('%n', '\n', 'newline character'),
|
||||||
('%t', '\t', 'tab character'),
|
('%t', '\t', 'tab character'),
|
||||||
|
('%Z', tz, 'time zone name'),
|
||||||
)
|
)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
|
|
|
@ -667,7 +667,11 @@ def __init__(self, screenName=None, baseName=None, className='Tk'):
|
||||||
try:
|
try:
|
||||||
# Disable event scanning except for Command-Period
|
# Disable event scanning except for Command-Period
|
||||||
import MacOS
|
import MacOS
|
||||||
MacOS.EnableAppswitch(0)
|
try:
|
||||||
|
MacOS.SchedParams(1, 0)
|
||||||
|
except AttributeError:
|
||||||
|
# pre-1.5, use old routine
|
||||||
|
MacOS.EnableAppswitch(0)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue