Show More
@@ -159,12 +159,12 b' which already exists. But you must first start the logging process with' | |||||
159 | print('Logging has not been activated.') |
|
159 | print('Logging has not been activated.') | |
160 | else: |
|
160 | else: | |
161 | state = self.log_active and 'active' or 'temporarily suspended' |
|
161 | state = self.log_active and 'active' or 'temporarily suspended' | |
162 | print('Filename :',self.logfname) |
|
162 | print('Filename :', self.logfname) | |
163 | print('Mode :',self.logmode) |
|
163 | print('Mode :', self.logmode) | |
164 | print('Output logging :',self.log_output) |
|
164 | print('Output logging :', self.log_output) | |
165 | print('Raw input log :',self.log_raw_input) |
|
165 | print('Raw input log :', self.log_raw_input) | |
166 | print('Timestamping :',self.timestamp) |
|
166 | print('Timestamping :', self.timestamp) | |
167 | print('State :',state) |
|
167 | print('State :', state) | |
168 |
|
168 | |||
169 | def log(self, line_mod, line_ori): |
|
169 | def log(self, line_mod, line_ori): | |
170 | """Write the sources to a log. |
|
170 | """Write the sources to a log. |
@@ -117,7 +117,7 b' class OSMagics(Magics):' | |||||
117 | try: |
|
117 | try: | |
118 | alias,cmd = par.split(None, 1) |
|
118 | alias,cmd = par.split(None, 1) | |
119 | except TypeError: |
|
119 | except TypeError: | |
120 |
print |
|
120 | print(oinspect.getdoc(self.alias)) | |
121 | return |
|
121 | return | |
122 |
|
122 | |||
123 | try: |
|
123 | try: |
@@ -140,5 +140,4 b' class PylabMagics(Magics):' | |||||
140 | def _show_matplotlib_backend(self, gui, backend): |
|
140 | def _show_matplotlib_backend(self, gui, backend): | |
141 | """show matplotlib message backend message""" |
|
141 | """show matplotlib message backend message""" | |
142 | if not gui or gui == 'auto': |
|
142 | if not gui or gui == 'auto': | |
143 |
print |
|
143 | print("Using matplotlib backend: %s" % backend) | |
144 |
|
@@ -75,7 +75,7 b' def getfigs(*fig_nums):' | |||||
75 | for num in fig_nums: |
|
75 | for num in fig_nums: | |
76 | f = Gcf.figs.get(num) |
|
76 | f = Gcf.figs.get(num) | |
77 | if f is None: |
|
77 | if f is None: | |
78 |
print |
|
78 | print('Warning: figure %s not available.' % num) | |
79 | else: |
|
79 | else: | |
80 | figs.append(f.canvas.figure) |
|
80 | figs.append(f.canvas.figure) | |
81 | return figs |
|
81 | return figs |
@@ -249,7 +249,7 b' class InteractiveShellApp(Configurable):' | |||||
249 | self.log.info("Enabling GUI event loop integration, " |
|
249 | self.log.info("Enabling GUI event loop integration, " | |
250 | "eventloop=%s, matplotlib=%s", gui, backend) |
|
250 | "eventloop=%s, matplotlib=%s", gui, backend) | |
251 | if key == "auto": |
|
251 | if key == "auto": | |
252 |
print |
|
252 | print("Using matplotlib backend: %s" % backend) | |
253 | else: |
|
253 | else: | |
254 | gui = r |
|
254 | gui = r | |
255 | self.log.info("Enabling GUI event loop integration, " |
|
255 | self.log.info("Enabling GUI event loop integration, " |
@@ -475,7 +475,6 b' class AutoreloadMagics(Magics):' | |||||
475 | if not modname: |
|
475 | if not modname: | |
476 | to_reload = sorted(self._reloader.modules.keys()) |
|
476 | to_reload = sorted(self._reloader.modules.keys()) | |
477 | to_skip = sorted(self._reloader.skip_modules.keys()) |
|
477 | to_skip = sorted(self._reloader.skip_modules.keys()) | |
478 | to_skip.sort() |
|
|||
479 | if stream is None: |
|
478 | if stream is None: | |
480 | stream = sys.stdout |
|
479 | stream = sys.stdout | |
481 | if self._reloader.check_all: |
|
480 | if self._reloader.check_all: |
@@ -618,9 +618,9 b' class RMagics(Magics):' | |||||
618 | ri.set_writeconsole(old_writeconsole) |
|
618 | ri.set_writeconsole(old_writeconsole) | |
619 |
|
619 | |||
620 | except RInterpreterError as e: |
|
620 | except RInterpreterError as e: | |
621 |
print |
|
621 | print(e.stdout) | |
622 | if not e.stdout.endswith(e.err): |
|
622 | if not e.stdout.endswith(e.err): | |
623 |
print |
|
623 | print(e.err) | |
624 | rmtree(tmpd) |
|
624 | rmtree(tmpd) | |
625 | return |
|
625 | return | |
626 |
|
626 |
@@ -157,7 +157,7 b" def install_mathjax(tag='v2.2', dest=default_dest, replace=False, file=None, ext" | |||||
157 | try: |
|
157 | try: | |
158 | anything_to_do = prepare_dest(dest, replace) |
|
158 | anything_to_do = prepare_dest(dest, replace) | |
159 | except OSError as e: |
|
159 | except OSError as e: | |
160 |
print |
|
160 | print("ERROR %s, require write access to %s" % (e, dest)) | |
161 | return 1 |
|
161 | return 1 | |
162 | else: |
|
162 | else: | |
163 | if not anything_to_do: |
|
163 | if not anything_to_do: |
@@ -398,7 +398,7 b' class Demo(object):' | |||||
398 |
|
398 | |||
399 | print(self.marquee('<%s> block # %s (%s remaining)' % |
|
399 | print(self.marquee('<%s> block # %s (%s remaining)' % | |
400 | (self.title,index,self.nblocks-index-1)), file=io.stdout) |
|
400 | (self.title,index,self.nblocks-index-1)), file=io.stdout) | |
401 |
print |
|
401 | print(self.src_blocks_colored[index], file=io.stdout) | |
402 | sys.stdout.flush() |
|
402 | sys.stdout.flush() | |
403 |
|
403 | |||
404 | def show_all(self): |
|
404 | def show_all(self): |
@@ -93,7 +93,7 b' class ServePostProcessor(PostProcessorBase):' | |||||
93 | http_server = httpserver.HTTPServer(app) |
|
93 | http_server = httpserver.HTTPServer(app) | |
94 | http_server.listen(self.port, address=self.ip) |
|
94 | http_server.listen(self.port, address=self.ip) | |
95 | url = "http://%s:%i/%s" % (self.ip, self.port, filename) |
|
95 | url = "http://%s:%i/%s" % (self.ip, self.port, filename) | |
96 |
print |
|
96 | print("Serving your slides at %s" % url) | |
97 | print("Use Control-C to stop this server") |
|
97 | print("Use Control-C to stop this server") | |
98 | if self.open_in_browser: |
|
98 | if self.open_in_browser: | |
99 | webbrowser.open(url, new=2) |
|
99 | webbrowser.open(url, new=2) |
@@ -35,9 +35,9 b' class DebugWriter(WriterBase):' | |||||
35 | """ |
|
35 | """ | |
36 |
|
36 | |||
37 | if isinstance(resources['outputs'], dict): |
|
37 | if isinstance(resources['outputs'], dict): | |
38 |
print |
|
38 | print("outputs extracted from %s" % notebook_name) | |
39 |
print |
|
39 | print('-' * 80) | |
40 | pprint(resources['outputs'], indent=2, width=70) |
|
40 | pprint(resources['outputs'], indent=2, width=70) | |
41 | else: |
|
41 | else: | |
42 |
print |
|
42 | print("no outputs extracted from %s" % notebook_name) | |
43 |
print |
|
43 | print('=' * 80) |
@@ -734,9 +734,9 b' class Client(HasTraits):' | |||||
734 | msg_id = parent['msg_id'] |
|
734 | msg_id = parent['msg_id'] | |
735 | if msg_id not in self.outstanding: |
|
735 | if msg_id not in self.outstanding: | |
736 | if msg_id in self.history: |
|
736 | if msg_id in self.history: | |
737 |
print |
|
737 | print("got stale result: %s"%msg_id) | |
738 | else: |
|
738 | else: | |
739 |
print |
|
739 | print("got unknown result: %s"%msg_id) | |
740 | else: |
|
740 | else: | |
741 | self.outstanding.remove(msg_id) |
|
741 | self.outstanding.remove(msg_id) | |
742 |
|
742 | |||
@@ -770,11 +770,11 b' class Client(HasTraits):' | |||||
770 | msg_id = parent['msg_id'] |
|
770 | msg_id = parent['msg_id'] | |
771 | if msg_id not in self.outstanding: |
|
771 | if msg_id not in self.outstanding: | |
772 | if msg_id in self.history: |
|
772 | if msg_id in self.history: | |
773 |
print |
|
773 | print("got stale result: %s"%msg_id) | |
774 | print(self.results[msg_id]) |
|
774 | print(self.results[msg_id]) | |
775 | print(msg) |
|
775 | print(msg) | |
776 | else: |
|
776 | else: | |
777 |
print |
|
777 | print("got unknown result: %s"%msg_id) | |
778 | else: |
|
778 | else: | |
779 | self.outstanding.remove(msg_id) |
|
779 | self.outstanding.remove(msg_id) | |
780 | content = msg['content'] |
|
780 | content = msg['content'] |
General Comments 0
You need to be logged in to leave comments.
Login now