Show More
@@ -157,12 +157,13 class Converter(object): | |||||
157 | def save(self, infile=None, encoding=None): |
|
157 | def save(self, infile=None, encoding=None): | |
158 | "read and parse notebook into self.nb" |
|
158 | "read and parse notebook into self.nb" | |
159 | if infile is None: |
|
159 | if infile is None: | |
160 |
|
|
160 | outfile = os.path.basename(self.infile) | |
|
161 | outfile = os.path.splitext(outfile)[0] + '.' + self.extension | |||
161 | if encoding is None: |
|
162 | if encoding is None: | |
162 | encoding = self.default_encoding |
|
163 | encoding = self.default_encoding | |
163 |
with open( |
|
164 | with open(outfile, 'w') as f: | |
164 | f.write(self.output.encode(encoding)) |
|
165 | f.write(self.output.encode(encoding)) | |
165 |
return |
|
166 | return os.path.abspath(outfile) | |
166 |
|
167 | |||
167 | def optional_header(self): |
|
168 | def optional_header(self): | |
168 | return [] |
|
169 | return [] |
General Comments 0
You need to be logged in to leave comments.
Login now