Esempio n. 1
0
 def getScriptArgs(self, script):
     args = script.split()
     scriptName = args[0]
     instScript = plugins.installationPath(os.path.join("libexec", scriptName))
     if instScript:
         args = [ instScript ] + args[1:]
         
     return args
Esempio n. 2
0
 def addContents(self):
     try:
         file = open(plugins.installationPath("doc", self.fileName))
         text = file.read()
         file.close()
         buffer = gtk.TextBuffer()
         buffer.set_text(text)
     except Exception, e: #pragma : no cover - should never happen
         self.showErrorDialog("Failed to show " + self.fileName + " file:\n" + str(e))
         return
Esempio n. 3
0
 def findPython(self, machine):
     # In case it isn't the default, allow for a ttpython script in the installation
     if machine == "localhost":
         return sys.executable
     
     localPointer = plugins.installationPath("bin/ttpython")
     if localPointer:
         return localPointer
     else: # pragma : no cover -there is one in our local installation whether we like it or not...
         return "python"