Remove all extensions before inport, not just .py
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,9 +115,7 @@ def main(argv):
|
|||||||
print "Please specify a demo module name on the command-line"
|
print "Please specify a demo module name on the command-line"
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
name = argv[1]
|
name, ext = os.path.splitext(argv[1])
|
||||||
if name[-3:] == '.py':
|
|
||||||
name = name[:-3]
|
|
||||||
module = __import__(name)
|
module = __import__(name)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user