Show More
@@ -927,8 +927,8 b' class InteractiveShell(object,Magic):' | |||||
927 | Certain history lists are also initialized here, as they effectively |
|
927 | Certain history lists are also initialized here, as they effectively | |
928 | act as user namespaces. |
|
928 | act as user namespaces. | |
929 |
|
929 | |||
930 | Note |
|
930 | Notes | |
931 | ---- |
|
931 | ----- | |
932 | All data structures here are only filled in, they are NOT reset by this |
|
932 | All data structures here are only filled in, they are NOT reset by this | |
933 | method. If they were not empty before, data will simply be added to |
|
933 | method. If they were not empty before, data will simply be added to | |
934 | therm. |
|
934 | therm. | |
@@ -1315,8 +1315,8 b' class InteractiveShell(object,Magic):' | |||||
1315 | def user_setup(self,ipythondir,rc_suffix,mode='install'): |
|
1315 | def user_setup(self,ipythondir,rc_suffix,mode='install'): | |
1316 | """Install the user configuration directory. |
|
1316 | """Install the user configuration directory. | |
1317 |
|
1317 | |||
1318 | Note |
|
1318 | Notes | |
1319 | ---- |
|
1319 | ----- | |
1320 | DEPRECATED: use the top-level user_setup() function instead. |
|
1320 | DEPRECATED: use the top-level user_setup() function instead. | |
1321 | """ |
|
1321 | """ | |
1322 | return user_setup(ipythondir,rc_suffix,mode) |
|
1322 | return user_setup(ipythondir,rc_suffix,mode) |
@@ -3345,7 +3345,7 b' Defaulting color scheme to \'NoColor\'"""' | |||||
3345 |
|
3345 | |||
3346 | See also |
|
3346 | See also | |
3347 | -------- |
|
3347 | -------- | |
3348 |
|
|
3348 | paste: automatically pull code from clipboard. | |
3349 | """ |
|
3349 | """ | |
3350 |
|
3350 | |||
3351 | opts,args = self.parse_options(parameter_s,'rs:',mode='string') |
|
3351 | opts,args = self.parse_options(parameter_s,'rs:',mode='string') | |
@@ -3384,7 +3384,7 b' Defaulting color scheme to \'NoColor\'"""' | |||||
3384 |
|
3384 | |||
3385 | See also |
|
3385 | See also | |
3386 | -------- |
|
3386 | -------- | |
3387 |
|
|
3387 | cpaste: manually paste code into terminal until you mark its end. | |
3388 | """ |
|
3388 | """ | |
3389 | opts,args = self.parse_options(parameter_s,'r:',mode='string') |
|
3389 | opts,args = self.parse_options(parameter_s,'r:',mode='string') | |
3390 | par = args.strip() |
|
3390 | par = args.strip() |
@@ -97,8 +97,8 b' class LineFrontEndBase(FrontEndBase):' | |||||
97 | ---------- |
|
97 | ---------- | |
98 | line : string |
|
98 | line : string | |
99 |
|
99 | |||
100 |
Res |
|
100 | Returns | |
101 | ------ |
|
101 | ------- | |
102 | The replacement for the line and the list of possible completions. |
|
102 | The replacement for the line and the list of possible completions. | |
103 | """ |
|
103 | """ | |
104 | completions = self.shell.complete(line) |
|
104 | completions = self.shell.complete(line) |
@@ -65,8 +65,8 b' class PrefilterFrontEnd(LineFrontEndBase):' | |||||
65 | debug = False |
|
65 | debug = False | |
66 |
|
66 | |||
67 | def __init__(self, ipython0=None, argv=None, *args, **kwargs): |
|
67 | def __init__(self, ipython0=None, argv=None, *args, **kwargs): | |
68 |
""" Parameters |
|
68 | """ Parameters | |
69 |
---------- |
|
69 | ---------- | |
70 |
|
70 | |||
71 | ipython0: an optional ipython0 instance to use for command |
|
71 | ipython0: an optional ipython0 instance to use for command | |
72 | prefiltering and completion. |
|
72 | prefiltering and completion. |
@@ -729,8 +729,8 b' class Interpreter(object):' | |||||
729 | def error(self, text): |
|
729 | def error(self, text): | |
730 | """ Pass an error message back to the shell. |
|
730 | """ Pass an error message back to the shell. | |
731 |
|
731 | |||
732 | Preconditions |
|
732 | Notes | |
733 |
----- |
|
733 | ----- | |
734 | This should only be called when self.message is set. In other words, |
|
734 | This should only be called when self.message is set. In other words, | |
735 | when code is being executed. |
|
735 | when code is being executed. | |
736 |
|
736 |
@@ -21,8 +21,8 b' __test__ = {}' | |||||
21 | class NotificationCenter(object): |
|
21 | class NotificationCenter(object): | |
22 | """Synchronous notification center |
|
22 | """Synchronous notification center | |
23 |
|
23 | |||
24 | Example |
|
24 | Examples | |
25 | ------- |
|
25 | -------- | |
26 | >>> import IPython.kernel.core.notification as notification |
|
26 | >>> import IPython.kernel.core.notification as notification | |
27 | >>> def callback(theType, theSender, args={}): |
|
27 | >>> def callback(theType, theSender, args={}): | |
28 | ... print theType,theSender,args |
|
28 | ... print theType,theSender,args | |
@@ -47,10 +47,10 b' class NotificationCenter(object):' | |||||
47 |
|
47 | |||
48 | def post_notification(self, theType, sender, **kwargs): |
|
48 | def post_notification(self, theType, sender, **kwargs): | |
49 | """Post notification (type,sender,**kwargs) to all registered |
|
49 | """Post notification (type,sender,**kwargs) to all registered | |
50 |
observers. |
|
50 | observers. | |
51 |
|
51 | |||
52 | Implementation |
|
52 | Implementation notes: | |
53 | -------------- |
|
53 | ||
54 | * If no registered observers, performance is O(1). |
|
54 | * If no registered observers, performance is O(1). | |
55 | * Notificaiton order is undefined. |
|
55 | * Notificaiton order is undefined. | |
56 | * Notifications are posted synchronously. |
|
56 | * Notifications are posted synchronously. | |
@@ -122,4 +122,4 b' class NotificationCenter(object):' | |||||
122 |
|
122 | |||
123 |
|
123 | |||
124 |
|
124 | |||
125 | sharedCenter = NotificationCenter() No newline at end of file |
|
125 | sharedCenter = NotificationCenter() |
@@ -106,6 +106,9 b' def make_quoted_expr(s):' | |||||
106 | def system_shell(cmd, verbose=False, debug=False, header=''): |
|
106 | def system_shell(cmd, verbose=False, debug=False, header=''): | |
107 | """ Execute a command in the system shell; always return None. |
|
107 | """ Execute a command in the system shell; always return None. | |
108 |
|
108 | |||
|
109 | This returns None so it can be conveniently used in interactive loops | |||
|
110 | without getting the return value (typically 0) printed many times. | |||
|
111 | ||||
109 | Parameters |
|
112 | Parameters | |
110 | ---------- |
|
113 | ---------- | |
111 | cmd : str |
|
114 | cmd : str | |
@@ -117,11 +120,6 b" def system_shell(cmd, verbose=False, debug=False, header=''):" | |||||
117 | header : str |
|
120 | header : str | |
118 | Header to print to screen prior to the executed command. No extra |
|
121 | Header to print to screen prior to the executed command. No extra | |
119 | newlines are added. |
|
122 | newlines are added. | |
120 |
|
||||
121 | Description |
|
|||
122 | ----------- |
|
|||
123 | This returns None so it can be conveniently used in interactive loops |
|
|||
124 | without getting the return value (typically 0) printed many times. |
|
|||
125 | """ |
|
123 | """ | |
126 |
|
124 | |||
127 | if verbose or debug: |
|
125 | if verbose or debug: |
@@ -86,14 +86,13 b' class PendingResult(object):' | |||||
86 |
|
86 | |||
87 | A user should not create a `PendingResult` instance by hand. |
|
87 | A user should not create a `PendingResult` instance by hand. | |
88 |
|
88 | |||
89 | Methods |
|
89 | Methods: | |
90 | ======= |
|
|||
91 |
|
90 | |||
92 | * `get_result` |
|
91 | * `get_result` | |
93 | * `add_callback` |
|
92 | * `add_callback` | |
94 |
|
93 | |||
95 | Properties |
|
94 | Properties: | |
96 | ========== |
|
95 | ||
97 | * `r` |
|
96 | * `r` | |
98 | """ |
|
97 | """ | |
99 |
|
98 |
@@ -414,7 +414,7 b' class ResultNS(object):' | |||||
414 | This can be a bad idea, as it may corrupt standard behavior of the |
|
414 | This can be a bad idea, as it may corrupt standard behavior of the | |
415 | ns object. |
|
415 | ns object. | |
416 |
|
416 | |||
417 | Example |
|
417 | Examples | |
418 | -------- |
|
418 | -------- | |
419 |
|
419 | |||
420 | >>> ns = ResultNS({'a':17,'foo':range(3)}) |
|
420 | >>> ns = ResultNS({'a':17,'foo':range(3)}) |
@@ -10,9 +10,10 b' class C(object):' | |||||
10 | pass |
|
10 | pass | |
11 | #print 'deleting object...' # dbg |
|
11 | #print 'deleting object...' # dbg | |
12 |
|
12 | |||
13 | c = C() |
|
13 | if __name__ == '__main__': | |
|
14 | c = C() | |||
14 |
|
15 | |||
15 | c_refs = gc.get_referrers(c) |
|
16 | c_refs = gc.get_referrers(c) | |
16 | ref_ids = map(id,c_refs) |
|
17 | ref_ids = map(id,c_refs) | |
17 |
|
18 | |||
18 | print 'c referrers:',map(type,c_refs) |
|
19 | print 'c referrers:',map(type,c_refs) |
@@ -892,8 +892,8 b' def doctest_reload():' | |||||
892 | hard monkeypatch seems like a reasonable solution rather than asking |
|
892 | hard monkeypatch seems like a reasonable solution rather than asking | |
893 | users to manually use a different doctest runner when under IPython. |
|
893 | users to manually use a different doctest runner when under IPython. | |
894 |
|
894 | |||
895 | Note |
|
895 | Notes | |
896 | ---- |
|
896 | ----- | |
897 |
|
897 | |||
898 | This function *used to* reload doctest, but this has been disabled because |
|
898 | This function *used to* reload doctest, but this has been disabled because | |
899 | reloading doctest unconditionally can cause massive breakage of other |
|
899 | reloading doctest unconditionally can cause massive breakage of other |
@@ -38,7 +38,7 b' To use code that calls MPI, there are typically two things that MPI requires.' | |||||
38 | There are a couple of ways that you can start the IPython engines and get these things to happen. |
|
38 | There are a couple of ways that you can start the IPython engines and get these things to happen. | |
39 |
|
39 | |||
40 | Automatic starting using :command:`mpiexec` and :command:`ipcluster` |
|
40 | Automatic starting using :command:`mpiexec` and :command:`ipcluster` | |
41 | ------------------------------------------------------------------- |
|
41 | -------------------------------------------------------------------- | |
42 |
|
42 | |||
43 | The easiest approach is to use the `mpiexec` mode of :command:`ipcluster`, which will first start a controller and then a set of engines using :command:`mpiexec`:: |
|
43 | The easiest approach is to use the `mpiexec` mode of :command:`ipcluster`, which will first start a controller and then a set of engines using :command:`mpiexec`:: | |
44 |
|
44 | |||
@@ -48,7 +48,7 b' This approach is best as interrupting :command:`ipcluster` will automatically' | |||||
48 | stop and clean up the controller and engines. |
|
48 | stop and clean up the controller and engines. | |
49 |
|
49 | |||
50 | Manual starting using :command:`mpiexec` |
|
50 | Manual starting using :command:`mpiexec` | |
51 | --------------------------------------- |
|
51 | ---------------------------------------- | |
52 |
|
52 | |||
53 | If you want to start the IPython engines using the :command:`mpiexec`, just do:: |
|
53 | If you want to start the IPython engines using the :command:`mpiexec`, just do:: | |
54 |
|
54 | |||
@@ -154,4 +154,4 b' compiled C, C++ and Fortran libraries that have been exposed to Python.' | |||||
154 | .. [MPI] Message Passing Interface. http://www-unix.mcs.anl.gov/mpi/ |
|
154 | .. [MPI] Message Passing Interface. http://www-unix.mcs.anl.gov/mpi/ | |
155 | .. [mpi4py] MPI for Python. mpi4py: http://mpi4py.scipy.org/ |
|
155 | .. [mpi4py] MPI for Python. mpi4py: http://mpi4py.scipy.org/ | |
156 | .. [OpenMPI] Open MPI. http://www.open-mpi.org/ |
|
156 | .. [OpenMPI] Open MPI. http://www.open-mpi.org/ | |
157 | .. [PyTrilinos] PyTrilinos. http://trilinos.sandia.gov/packages/pytrilinos/ No newline at end of file |
|
157 | .. [PyTrilinos] PyTrilinos. http://trilinos.sandia.gov/packages/pytrilinos/ |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed | ||
This diff has been collapsed as it changes many lines, (800 lines changed) Show them Hide them |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now