##// END OF EJS Templates
DirectView.sync_imports fixes...
MinRK -
Show More
@@ -405,7 +405,11 b' class DirectView(View):'
405 """Context Manager for performing simultaneous local and remote imports.
405 """Context Manager for performing simultaneous local and remote imports.
406
406
407 'import x as y' will *not* work. The 'as y' part will simply be ignored.
407 'import x as y' will *not* work. The 'as y' part will simply be ignored.
408
408
409 If `local=True`, then the package will also be imported locally.
410
411 Note that remote-only (`local=False`) imports have not been implemented.
412
409 >>> with view.sync_imports():
413 >>> with view.sync_imports():
410 ... from numpy import recarray
414 ... from numpy import recarray
411 importing recarray from numpy on engine(s)
415 importing recarray from numpy on engine(s)
@@ -468,7 +472,9 b' class DirectView(View):'
468 # enter the block
472 # enter the block
469 yield
473 yield
470 except ImportError:
474 except ImportError:
471 if not local:
475 if local:
476 raise
477 else:
472 # ignore import errors if not doing local imports
478 # ignore import errors if not doing local imports
473 pass
479 pass
474 finally:
480 finally:
General Comments 0
You need to be logged in to leave comments. Login now