Utilities/__init__.py

branch
5_1_x
changeset 1175
93655105b6de
parent 1168
68d25b6dd44d
child 1317
aa16b0456e8f
--- a/Utilities/__init__.py	Sat Jul 16 13:53:48 2011 +0200
+++ b/Utilities/__init__.py	Sat Jul 16 14:08:51 2011 +0200
@@ -1312,6 +1312,27 @@
     return ("open", newArgs)
 
 ################################################################################
+# Qt utility functions below
+################################################################################
+
+def generatePySideToolPath(toolname):
+    """
+    Module function to generate the executable path for a PySide tool.
+    
+    @param toolname base name of the tool (string or QString)
+    @return the PySide tool path with extension (string)
+    """
+    if isWindowsPlatform():
+        prefix = os.path.dirname(Preferences.getDebugger("PythonInterpreter"))
+        if toolname == "pyside-uic":
+            return os.path.join(prefix, "Scripts", toolname + '.exe')
+        else:
+            return os.path.join(prefix, "Lib", "site-packages", "PySide",
+                                toolname + ".exe")
+    else:
+        return toolname
+
+################################################################################
 # Other utility functions below
 ################################################################################
 

eric ide

mercurial