Fixed an issue with blanks in pathname of eric plug-ins when developing them.

Wed, 22 Dec 2010 17:31:41 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 22 Dec 2010 17:31:41 +0100
changeset 768
df2dbf3072be
parent 767
27554f80d08f
child 770
75557c1c1bfb

Fixed an issue with blanks in pathname of eric plug-ins when developing them.

Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Utilities/__init__.py file | annotate | diff | comparison | revisions
eric5.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugUI.py	Mon Dec 20 20:07:36 2010 +0100
+++ b/Debugger/DebugUI.py	Wed Dec 22 17:31:41 2010 +0100
@@ -1416,7 +1416,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin={0} {1}".format(fn, argv)
+                    argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1520,7 +1520,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin={0} {1}".format(fn, argv)
+                    argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1627,7 +1627,7 @@
             
             if not doNotStart:
                 if runProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin={0} {1}".format(fn, argv)
+                    argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
                 # Ask the client to open the new program.
@@ -1742,7 +1742,7 @@
             
             if not doNotStart:
                 if debugProject and self.project.getProjectType() == "E4Plugin":
-                    argv = "--plugin={0} {1}".format(fn, argv)
+                    argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                     tracePython = True # override flag because it must be true
                 
@@ -1793,7 +1793,7 @@
         
         if not doNotStart:
             if forProject and self.project.getProjectType() == "E4Plugin":
-                argv = "--plugin={0} {1}".format(fn, argv)
+                argv = '--plugin="{0}" {1}'.format(fn, argv)
                 fn = os.path.join(getConfig('ericDir'), "eric5.py")
             
             if self.lastStartAction in [1, 2]:
--- a/Utilities/__init__.py	Mon Dec 20 20:07:36 2010 +0100
+++ b/Utilities/__init__.py	Wed Dec 22 17:31:41 2010 +0100
@@ -771,7 +771,7 @@
     @param s option string (string or string)
     @return list of options (list of strings)
     """
-    rx = QRegExp(r"""\s([^\s]+|"[^"]+"|'[^']+')""")
+    rx = QRegExp(r"""\s([\w=/-]*"[^"]+"|[\w=/-]*'[^']+'|[^\s]+)""")
     s = re.sub(r"%[A-Z%]", _percentReplacementFunc, s)
     return parseString(s, rx)
     
--- a/eric5.py	Mon Dec 20 20:07:36 2010 +0100
+++ b/eric5.py	Wed Dec 22 17:31:41 2010 +0100
@@ -211,7 +211,7 @@
     for arg in sys.argv:
         if arg.startswith("--plugin=") and sys.argv.index(arg) < ddindex:
             # extract the plugin development option
-            pluginFile = arg.replace("--plugin=", "")
+            pluginFile = arg.replace("--plugin=", "").replace('"', "")
             sys.argv.remove(arg)
             pluginFile = os.path.expanduser(pluginFile)
             pluginFile = Utilities.normabspath(pluginFile)

eric ide

mercurial