]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove all extensions before inport, not just .py
authorRobin Dunn <robin@alldunn.com>
Mon, 26 Jan 2004 22:45:58 +0000 (22:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 26 Jan 2004 22:45:58 +0000 (22:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/run.py

index 99d76f574577096fe268e0bd0360c999732648df..fda545c5b093156eb7de34c29ad06ac21376a001 100755 (executable)
@@ -115,9 +115,7 @@ def main(argv):
         print "Please specify a demo module name on the command-line"
         raise SystemExit
 
-    name = argv[1]
-    if name[-3:] == '.py':
-        name = name[:-3]
+    name, ext  = os.path.splitext(argv[1])
     module = __import__(name)