[Ipython-tickets] [IPython] #156: ipython crashes when input specific characters

IPython ipython-tickets@scipy....
Fri Oct 5 02:01:15 CDT 2007


#156: ipython crashes when input specific characters
---------------------+------------------------------------------------------
 Reporter:  hongqn   |        Owner:  fperez
     Type:  defect   |       Status:  new   
 Priority:  normal   |    Milestone:        
Component:  ipython  |      Version:        
 Severity:  major    |   Resolution:        
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by Truck):

 I had a similar problem when inputting ä - very frequent in Finnish:

 ikanim:~ truck$ ipython
 Python 2.4.4 (#1, Sep 25 2007, 16:06:09)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.8.1 -- An enhanced Interactive Python.
 ?       -> Introduction to IPython's features.
 %magic  -> Information about IPython's 'magic' % functions.
 help    -> Python's own help system.
 object? -> Details about 'object'. ?object also works, ?? prints more.

 In [1]: print "ä"
 WARNING:
 ********
 You or a %run:ed script called sys.stdin.close() or sys.stdout.close()!
 Exiting IPython!

 - This worked, as above, in python.  HOWEVER.

 My Locale for LC_CTYPE was set to C, after changing it to UTF8, the issue
 goes away for the ä ...

 ikanim:~ truck$ export LC_CTYPE="en_IE.UTF-8"
 ikanim:~ truck$ ipython
 Python 2.4.4 (#1, Sep 25 2007, 16:06:09)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.8.1 -- An enhanced Interactive Python.
 ?       -> Introduction to IPython's features.
 %magic  -> Information about IPython's 'magic' % functions.
 help    -> Python's own help system.
 object? -> Details about 'object'. ?object also works, ?? prints more.

 In [1]: print "ä"
 ä

 In [2]:

 However it does NOT go away for the Chinese character:

 ikanim:~ truck$ export LC_CTYPE="zh_HK.UTF-8"
 ikanim:~ truck$ ipython
 Python 2.4.4 (#1, Sep 25 2007, 16:06:09)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.8.1 -- An enhanced Interactive Python.
 ?       -> Introduction to IPython's features.
 %magic  -> Information about IPython's 'magic' % functions.
 help    -> Python's own help system.
 object? -> Details about 'object'. ?object also works, ?? prints more.

 In [1]: '你好'
 Out[1]: '\xe4\xbd\xa0\xe5\xa5\xbd'

 In [2]: '    ##'
 WARNING:
 ********
 You or a %run:ed script called sys.stdin.close() or sys.stdout.close()!
 Exiting IPython!

 It is my hope that this helps you to track down the problem; or at least
 propose a workaround for some folks experiencing this issue.

-- 
Ticket URL: <http://ipython.scipy.org/ipython/ipython/ticket/156#comment:1>
IPython <http://ipython.scipy.org>
The IPython interactive Python system


More information about the Ipython-tickets mailing list