[Idle-dev] IDLE crash (2.0 with VPython) on unicode string
Bernie
bernie@3captus.com
Sat, 06 Oct 2001 10:21:14 +0800
Hi,
I am using Pyhton 2.0 (with VPython extension) on MS Windows 98, Second
Edition (Chinese), and have encountered a crash when I try to use Unicode
string.
I understand that the use of VPython did push back the IDLE version back
to version 0.5. I am trying to figure out if:
- it was a known bug and was fixed; or
- the crash was caused by VPython IDLE; or
- it is a new bug
Please try the following out on your IDLE:
a = u'卡 塔 爾 半 島 電 視 台 周 四 播 出 美 國 九 一 一 襲 擊 事 件 '
Thanks!
Bernie
============================================================================
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-2000 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
IDLE 0.5 -- press F1 for help
>>> a = u'卡 塔 爾 半 島 電 視 台 周 四 播 出 美 國 九 一 一 襲 擊 事 件 '
^
crash when hit <Enter>_______________|
Exception in Tkinter callback
Traceback (most recent call last):
File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__
return apply(self.func, args)
File "C:\PYTHON20\Tools\idle\PyShell.py", line 592, in enter_callback
self.auto.auto_indent(event)
File "C:\PYTHON20\Tools\idle\AutoIndent.py", line 270, in
newline_and_indent_event
c = y.get_continuation_type()
File "C:\PYTHON20\Tools\idle\PyParse.py", line 332, in get_continuation_type
self._study1()
File "C:\PYTHON20\Tools\idle\PyParse.py", line 220, in _study1
str = string.translate(str, _tran)
File "c:\python20\lib\string.py", line 308, in translate
return s.translate(table, deletions)
TypeError: translate requires exactly 1 argument; 2 given