Some little tweaks and fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-06-06 01:15:14 +00:00
parent a0c031bcce
commit 3426d72bc3
4 changed files with 11 additions and 4 deletions

View File

@@ -771,7 +771,9 @@ def myExecfile(filename, ns):
if sys.version_info < (3,):
execfile(filename, ns)
else:
source = open(filename, 'r').read()
f = open(filename, 'r')
source = f.read()
f.close()
exec(source, ns)

View File

@@ -649,6 +649,9 @@ from .%s import *
for idx, pn in enumerate(pnames):
# take only the part before the =, if there is one
name = pn.split('=')[0].strip()
# remove annotations
name = re.sub('/[A-Za-z]*/', '', name)
name = name.strip()
# now get just the part after any space, * or &, which should be
# the parameter name
name = re.split(r'[ \*\&]+', name)[-1]
@@ -690,6 +693,7 @@ from .%s import *
# take only the part before the =, if there is one
arg = arg.split('=')[0].strip()
arg = arg.replace('&', '*') # SIP will always want to use pointers for parameters
arg = re.sub('/[A-Za-z]*/', '', arg) # remove annotations
fargs[idx] = arg
fargs = ', '.join(fargs)
if method.isCtor:

View File

@@ -9,7 +9,7 @@ else: # run as main?
if not d: d = '.'
phoenixDir = os.path.abspath(d+'/..')
#if phoenixDir not in sys.path:
# in case phoenixDir not in sys.path:
sys.path.insert(0, phoenixDir)
# stuff for debugging

View File

@@ -17,13 +17,14 @@ class animate_Tests(wtc.WidgetTestCase):
self.assertTrue(ani.IsOk())
anictrl = wx.adv.AnimationCtrl(self.frame, anim=ani)
anictrl.Play()
self.waitFor(500)
def test_animate2(self):
ani = wx.adv.Animation(gifFile)
self.assertTrue(ani.IsOk())
anictrl = wx.adv.AnimationCtrl(self.frame, anim=ani)
anictrl.Play()
self.waitFor(500)
#---------------------------------------------------------------------------