From 33a6da35ee2bcd790f968979ab62695a06b18628 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 3 May 2012 23:30:48 +0000 Subject: [PATCH] Remove wx prefixes for default values in the pyArgsString. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etgtools/extractors.py | 2 ++ etgtools/sip_generator.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/etgtools/extractors.py b/etgtools/extractors.py index 5c7450e8..8ac52673 100644 --- a/etgtools/extractors.py +++ b/etgtools/extractors.py @@ -442,6 +442,8 @@ class FunctionDef(BaseDef): arg = arg.split('=')[0] if default in defValueMap: default = defValueMap.get(default) + else: + default = removeWxPrefix(default) # now grab just the last word, it should be the variable name arg = arg.split()[-1] if default: diff --git a/etgtools/sip_generator.py b/etgtools/sip_generator.py index 55ea7c0d..70deb5ff 100644 --- a/etgtools/sip_generator.py +++ b/etgtools/sip_generator.py @@ -647,7 +647,7 @@ from %s import * for idx, pn in enumerate(pnames): # take only the part before the =, if there is one name = pn.split('=')[0].strip() - # now get just the part after and space, * or &, which should be + # now get just the part after any space, * or &, which should be # the parameter name name = re.split(r'[ \*\&]+', name)[-1] pnames[idx] = name