Skip to content

Commit

Permalink
Check veusz executables exist in embedding interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysanders committed Mar 1, 2010
1 parent c6f4819 commit 42d2f13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,17 @@ def makeRemoteProcess(cls):

# try embed_remote.py in this directory, veusz in this directory
# or veusz on the path in order
for shell, cmd in ( (False, [sys.executable, remoteembed]),
(False, [veuszex]),
(False, ['veusz']),
(True, ['veusz']), ):
for withpath, cmd in ( (False, [sys.executable, remoteembed]),
(False, [veuszex]),
(True, ['veusz']), ):
# windows doesn't seem to think an exception should be raised
# if there is an error running the command
if not withpath and False in [os.path.exists(c) for c in cmd]:
continue

try:
cls.remote = subprocess.Popen(cmd + ['--embed-remote'],
shell=shell, bufsize=0,
shell=False, bufsize=0,
close_fds=False,
stdin=subprocess.PIPE)
return
Expand Down

0 comments on commit 42d2f13

Please sign in to comment.