|
Lines 323-333
Link Here
|
| 323 |
for i in range(4): |
323 |
for i in range(4): |
| 324 |
self.labelbox[i].show() |
324 |
self.labelbox[i].show() |
| 325 |
self.notebook.show() |
325 |
self.notebook.show() |
|
|
326 |
|
| 327 |
def which(self,program): |
| 328 |
import os |
| 329 |
def is_exe(fpath): |
| 330 |
return os.path.exists(fpath) and os.access(fpath, os.X_OK) |
| 331 |
|
| 332 |
fpath, fname = os.path.split(program) |
| 333 |
if fpath: |
| 334 |
if is_exe(program): |
| 335 |
return program |
| 336 |
else: |
| 337 |
for path in os.environ["PATH"].split(os.pathsep): |
| 338 |
exe_file = os.path.join(path, program) |
| 339 |
if is_exe(exe_file): |
| 340 |
return exe_file |
| 341 |
|
| 342 |
return None |
| 343 |
|
| 344 |
|
| 326 |
def __runJackLSP__(self,button=None): |
345 |
def __runJackLSP__(self,button=None): |
| 327 |
if button!=None: |
346 |
if button!=None: |
| 328 |
self.__getSelectedPorts__() |
347 |
self.__getSelectedPorts__() |
| 329 |
self.ports=[] |
348 |
self.ports=[] |
| 330 |
failed=0 |
349 |
failed=0 |
|
|
350 |
if self.which('jack_lsp') == None: |
| 351 |
self.jack_button.set_sensitive(False) |
| 352 |
return |
| 331 |
(stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t') |
353 |
(stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t') |
| 332 |
ports=stdout.readlines() |
354 |
ports=stdout.readlines() |
| 333 |
stdin.close() |
355 |
stdin.close() |