##// END OF EJS Templates
pylinting
Matthias BUSSONNIER -
Show More
@@ -47,7 +47,7 class RichIPythonWidget(IPythonWidget):
47 # Do we support jpg ?
47 # Do we support jpg ?
48 # it seems that sometime jpg support is a plugin of QT, so try to assume
48 # it seems that sometime jpg support is a plugin of QT, so try to assume
49 # it is not always supported.
49 # it is not always supported.
50 self._supported_format = map(str,QtGui.QImageReader.supportedImageFormats())
50 self._supported_format = map(str, QtGui.QImageReader.supportedImageFormats())
51 self._jpg_supported = 'jpeg' in self._supported_format
51 self._jpg_supported = 'jpeg' in self._supported_format
52
52
53 #---------------------------------------------------------------------------
53 #---------------------------------------------------------------------------
@@ -84,10 +84,13 class RichIPythonWidget(IPythonWidget):
84 """ Overridden to handle rich data types, like SVG.
84 """ Overridden to handle rich data types, like SVG.
85 """
85 """
86 def pre_image_append():
86 def pre_image_append():
87 """ Append the Out[] prompt and mke the output nicer
88
89 Shared code for some the following if statement
90 """
87 self.log.debug("pyout: %s", msg.get('content', ''))
91 self.log.debug("pyout: %s", msg.get('content', ''))
88 self._append_plain_text(self.output_sep, True)
92 self._append_plain_text(self.output_sep, True)
89 self._append_html(self._make_out_prompt(prompt_number), True)
93 self._append_html(self._make_out_prompt(prompt_number), True)
90 # This helps the output to look nice.
91 self._append_plain_text('\n', True)
94 self._append_plain_text('\n', True)
92
95
93 if not self._hidden and self._is_from_this_session(msg):
96 if not self._hidden and self._is_from_this_session(msg):
@@ -218,7 +221,7 class RichIPythonWidget(IPythonWidget):
218 if not os.path.exists(path):
221 if not os.path.exists(path):
219 os.mkdir(path)
222 os.mkdir(path)
220 relpath = os.path.basename(path)
223 relpath = os.path.basename(path)
221 if image.save("%s/qt_img%s.%s" % (path,match.group("name"),format),
224 if image.save("%s/qt_img%s.%s" % (path, match.group("name"), format),
222 "PNG"):
225 "PNG"):
223 return '<img src="%s/qt_img%s.%s">' % (relpath,
226 return '<img src="%s/qt_img%s.%s">' % (relpath,
224 match.group("name"),format)
227 match.group("name"),format)
General Comments 0
You need to be logged in to leave comments. Login now