运行程序时出错,请教!

运行程序时出错,请教!

我是在windown下使用python的,刚练习了一条break语句,但是出错了。

程序:

[Copy to clipboard] [ - ]
CODE:
while Ture:
    s = raw_input('Enter something :')
    if s == 'quit':
        break
    print 'Length of the string is ', len(s)
print 'Done'

按F5之后,错误提示如下:
>>> Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "C:\Python24\lib\idlelib\ScriptBinding.py", line 142, in run_module_event
    code = self.checksyntax(filename)
  File "C:\Python24\lib\idlelib\ScriptBinding.py", line 101, in checksyntax
    return compile(source, filename, "exec"
UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-32: ordinal not in range(12


这是什么问题引起的,谢谢
True写成Ture能运行啊?
这里是写错了,程序里面是true
你这个练习有点复杂嘞,这么一个程序怎么会有下面那种exception, 如果光看这个程序,楼上的是正解罗
程序没错,command下执行可以。

[Copy to clipboard] [ - ]
CODE:
D:\>t.py
Enter something :123
Length of the string is  3
Enter something :123123
Length of the string is  6
Enter something :123123
Length of the string is  6
Enter something :qui
Length of the string is  3
Enter something :quit
Done

While and break 語句都沒錯...
Error Message 很明顯說出,錯的地方不是  while / break 語句
似乎是用另外了个模块compile来执行的,你的路径上是不是有中文啊?解码错误。