@@ -86,15 +86,22 @@ def save(self,fname=None, encoding=None):
8686
8787 def render_heading (self ,cell ):
8888 raise NotImplementedError
89+
8990 def render_code (self ,cell ):
9091 raise NotImplementedError
92+
9193 def render_markdown (self ,cell ):
9294 raise NotImplementedError
95+
9396 def render_pyout (self ,cell ):
9497 raise NotImplementedError
98+
9599 def render_display_data (self ,cell ):
96100 raise NotImplementedError
97101
102+ def render_stream (self ,cell ):
103+ raise NotImplementedError
104+
98105class ConverterRST (Converter ):
99106 extension = 'rst'
100107 def render_heading (self ,cell ):
@@ -134,7 +141,7 @@ def render_pyout(self,output):
134141 Returns list."""
135142
136143 lines = ['Out[%s]:' % output .prompt_number , '' ]
137-
144+
138145 if 'latex' in output :
139146 lines .extend (rst_directive ('.. math::' , output .latex ))
140147
@@ -160,7 +167,19 @@ def render_display_data(self,output):
160167 figures_counter += 1
161168 lines .append ('.. image:: %s' % fname )
162169 lines .append ('' )
163-
170+
171+ return lines
172+
173+ def render_stream (self ,output ):
174+ """convert stream part of a code cell to rst
175+
176+ Returns list."""
177+
178+ lines = []
179+
180+ if 'text' in output :
181+ lines .extend (rst_directive ('.. parsed-literal::' , output .text ))
182+
164183 return lines
165184
166185def rst2simplehtml (fname ):
0 commit comments