Show More
@@ -335,7 +335,7 b' class MultiEngine(ControllerAdapterBase):' | |||
|
335 | 335 | #--------------------------------------------------------------------------- |
|
336 | 336 | # IEngineMultiplexer methods |
|
337 | 337 | #--------------------------------------------------------------------------- |
|
338 |
|
|
|
338 | ||
|
339 | 339 | def execute(self, lines, targets='all'): |
|
340 | 340 | return self._performOnEnginesAndGatherBoth('execute', lines, targets=targets) |
|
341 | 341 |
@@ -22,17 +22,19 b' pjoin = os.path.join' | |||
|
22 | 22 | |
|
23 | 23 | from twisted.internet import reactor, defer |
|
24 | 24 | from twisted.internet.protocol import ProcessProtocol |
|
25 | from twisted.python import failure, log | |
|
26 | 25 | from twisted.internet.error import ProcessDone, ProcessTerminated |
|
27 | 26 | from twisted.internet.utils import getProcessOutput |
|
27 | from twisted.python import failure, log | |
|
28 | 28 | |
|
29 | 29 | from IPython.external import argparse |
|
30 | 30 | from IPython.external import Itpl |
|
31 | from IPython.kernel.twistedutil import gatherBoth | |
|
32 | from IPython.kernel.util import printer | |
|
33 | 31 | from IPython.genutils import get_ipython_dir, num_cpus |
|
34 | 32 | from IPython.kernel.fcutil import have_crypto |
|
35 | 33 | from IPython.kernel.error import SecurityError |
|
34 | from IPython.kernel.fcutil import have_crypto | |
|
35 | from IPython.kernel.twistedutil import gatherBoth | |
|
36 | from IPython.kernel.util import printer | |
|
37 | ||
|
36 | 38 | |
|
37 | 39 | #----------------------------------------------------------------------------- |
|
38 | 40 | # General process handling code |
@@ -44,10 +46,10 b' def find_exe(cmd):' | |||
|
44 | 46 | except ImportError: |
|
45 | 47 | raise ImportError('you need to have pywin32 installed for this to work') |
|
46 | 48 | else: |
|
47 | try: | |
|
48 |
|
|
|
49 | except: | |
|
50 |
|
|
|
49 | try: | |
|
50 | (path, offest) = win32api.SearchPath(os.environ['PATH'],cmd + '.exe') | |
|
51 | except: | |
|
52 | (path, offset) = win32api.SearchPath(os.environ['PATH'],cmd + '.bat') | |
|
51 | 53 | return path |
|
52 | 54 | |
|
53 | 55 | class ProcessStateError(Exception): |
@@ -290,7 +292,7 b' class BatchEngineSet(object):' | |||
|
290 | 292 | f = open(self.batch_file,'w') |
|
291 | 293 | f.write(script_as_string) |
|
292 | 294 | f.close() |
|
293 | ||
|
295 | ||
|
294 | 296 | def handle_error(self, f): |
|
295 | 297 | f.printTraceback() |
|
296 | 298 | f.raiseException() |
@@ -302,7 +304,7 b' class BatchEngineSet(object):' | |||
|
302 | 304 | d.addCallback(self.parse_job_id) |
|
303 | 305 | d.addErrback(self.handle_error) |
|
304 | 306 | return d |
|
305 |
|
|
|
307 | ||
|
306 | 308 | def kill(self): |
|
307 | 309 | d = getProcessOutput(self.delete_command, |
|
308 | 310 | [self.job_id],env=os.environ) |
@@ -346,8 +348,8 b' def main_local(args):' | |||
|
346 | 348 | cont_args.append('--logfile=%s' % pjoin(args.logdir,'ipcontroller')) |
|
347 | 349 | |
|
348 | 350 | # Check security settings before proceeding |
|
349 |
|
|
|
350 |
|
|
|
351 | if not check_security(args, cont_args): | |
|
352 | return | |
|
351 | 353 | |
|
352 | 354 | cl = ControllerLauncher(extra_args=cont_args) |
|
353 | 355 | dstart = cl.start() |
@@ -379,8 +381,8 b' def main_mpirun(args):' | |||
|
379 | 381 | cont_args.append('--logfile=%s' % pjoin(args.logdir,'ipcontroller')) |
|
380 | 382 | |
|
381 | 383 | # Check security settings before proceeding |
|
382 |
|
|
|
383 |
|
|
|
384 | if not check_security(args, cont_args): | |
|
385 | return | |
|
384 | 386 | |
|
385 | 387 | cl = ControllerLauncher(extra_args=cont_args) |
|
386 | 388 | dstart = cl.start() |
@@ -416,8 +418,8 b' def main_pbs(args):' | |||
|
416 | 418 | cont_args.append('--logfile=%s' % pjoin(args.logdir,'ipcontroller')) |
|
417 | 419 | |
|
418 | 420 | # Check security settings before proceeding |
|
419 |
|
|
|
420 |
|
|
|
421 | if not check_security(args, cont_args): | |
|
422 | return | |
|
421 | 423 | |
|
422 | 424 | cl = ControllerLauncher(extra_args=cont_args) |
|
423 | 425 | dstart = cl.start() |
General Comments 0
You need to be logged in to leave comments.
Login now