From 66886f659b686ebac18e968de0ffa1df84465922 2008-03-14 06:46:52 From: vivainio2 Date: 2008-03-14 06:46:52 Subject: [PATCH] revert previous (half-functional) commit --- diff --git a/IPython/Magic.py b/IPython/Magic.py index d667621..ca19315 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -2223,9 +2223,6 @@ Currently the magic system has the following functions:\n""" #print '*** args',args,'type',type(args) # dbg data = eval(args,self.shell.user_ns) - # convert string to unicode, "just in case" - if isinstance(data,str): - data = data.decode(self.stdin_encoding) if not type(data) in StringTypes: raise DataIsObject diff --git a/IPython/iplib.py b/IPython/iplib.py index a8ae0cd..c62761b 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -2484,13 +2484,12 @@ want to merge them back into the new files.""" % locals() - data(None): if data is given, it gets written out to the temp file immediately, and the file is closed again.""" - + filename = tempfile.mktemp('.py','ipython_edit_') - import codecs self.tempfiles.append(filename) if data: - tmp_file = codecs.open(filename,'w', encoding='UTF-8') + tmp_file = open(filename,'w') tmp_file.write(data) tmp_file.close() return filename