##// END OF EJS Templates
Fix for unicode support, python identifiers can only be ascii so we need to...
fperez -
Show More
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3
3
4 $Id: Magic.py 2153 2007-03-18 22:53:18Z fperez $"""
4 $Id: Magic.py 2187 2007-03-30 04:56:40Z fperez $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -670,8 +670,13 b' Currently the magic system has the following functions:\\n"""'
670 """Generic interface to the inspector system.
670 """Generic interface to the inspector system.
671
671
672 This function is meant to be called by pdef, pdoc & friends."""
672 This function is meant to be called by pdef, pdoc & friends."""
673
673
674 oname = oname.strip()
674 try:
675 oname = oname.strip().encode('ascii')
676 except UnicodeEncodeError:
677 print 'Python identifiers can only contain ascii characters.'
678 return 'not found'
679
675 info = Struct(self._ofind(oname, namespaces))
680 info = Struct(self._ofind(oname, namespaces))
676
681
677 if info.found:
682 if info.found:
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6
6
7 This file contains all the classes and helper functions specific to IPython.
7 This file contains all the classes and helper functions specific to IPython.
8
8
9 $Id: iplib.py 2173 2007-03-23 14:26:16Z vivainio $
9 $Id: iplib.py 2187 2007-03-30 04:56:40Z fperez $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -2382,6 +2382,7 b' want to merge them back into the new files.""" % locals()'
2382 line = line[:-1]
2382 line = line[:-1]
2383 self.log(line,'#?'+line,continue_prompt)
2383 self.log(line,'#?'+line,continue_prompt)
2384 if line:
2384 if line:
2385 #print 'line:<%r>' % line # dbg
2385 self.magic_pinfo(line)
2386 self.magic_pinfo(line)
2386 else:
2387 else:
2387 page(self.usage,screen_lines=self.rc.screen_length)
2388 page(self.usage,screen_lines=self.rc.screen_length)
@@ -1,3 +1,10 b''
1 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/Magic.py (_inspect): convert unicode input into ascii
4 before trying to evaluate it as a Python identifier. This fixes a
5 problem that the new unicode support had introduced when analyzing
6 long definition lines for functions.
7
1 2007-03-24 Walter Doerwald <walter@livinglogic.de>
8 2007-03-24 Walter Doerwald <walter@livinglogic.de>
2
9
3 * IPython/Extensions/igrid.py: Fix picking. Using
10 * IPython/Extensions/igrid.py: Fix picking. Using
General Comments 0
You need to be logged in to leave comments. Login now