Show More
@@ -2223,9 +2223,6 b' Currently the magic system has the following functions:\\n"""' | |||||
2223 |
|
2223 | |||
2224 | #print '*** args',args,'type',type(args) # dbg |
|
2224 | #print '*** args',args,'type',type(args) # dbg | |
2225 | data = eval(args,self.shell.user_ns) |
|
2225 | data = eval(args,self.shell.user_ns) | |
2226 | # convert string to unicode, "just in case" |
|
|||
2227 | if isinstance(data,str): |
|
|||
2228 | data = data.decode(self.stdin_encoding) |
|
|||
2229 | if not type(data) in StringTypes: |
|
2226 | if not type(data) in StringTypes: | |
2230 | raise DataIsObject |
|
2227 | raise DataIsObject | |
2231 |
|
2228 |
@@ -2486,11 +2486,10 b' want to merge them back into the new files.""" % locals()' | |||||
2486 | immediately, and the file is closed again.""" |
|
2486 | immediately, and the file is closed again.""" | |
2487 |
|
2487 | |||
2488 | filename = tempfile.mktemp('.py','ipython_edit_') |
|
2488 | filename = tempfile.mktemp('.py','ipython_edit_') | |
2489 | import codecs |
|
|||
2490 | self.tempfiles.append(filename) |
|
2489 | self.tempfiles.append(filename) | |
2491 |
|
2490 | |||
2492 | if data: |
|
2491 | if data: | |
2493 |
tmp_file = |
|
2492 | tmp_file = open(filename,'w') | |
2494 | tmp_file.write(data) |
|
2493 | tmp_file.write(data) | |
2495 | tmp_file.close() |
|
2494 | tmp_file.close() | |
2496 | return filename |
|
2495 | return filename |
General Comments 0
You need to be logged in to leave comments.
Login now