Show More
@@ -587,13 +587,13 b' execution, and will fail with an UnmetDependencyError.' | |||
|
587 | 587 | |
|
588 | 588 | In [69]: from IPython.parallel import require |
|
589 | 589 | |
|
590 | In [70]: @requre('re'): | |
|
590 | In [70]: @require('re'): | |
|
591 | 591 | ...: def findall(pat, x): |
|
592 | 592 | ...: # re is guaranteed to be available |
|
593 | 593 | ...: return re.findall(pat, x) |
|
594 | 594 | |
|
595 | 595 | # you can also pass modules themselves, that you already have locally: |
|
596 | In [71]: @requre(time): | |
|
596 | In [71]: @require(time): | |
|
597 | 597 | ...: def wait(t): |
|
598 | 598 | ...: time.sleep(t) |
|
599 | 599 | ...: return t |
General Comments 0
You need to be logged in to leave comments.
Login now