[IronPython] Bug in beta9?
Dino Viehland
dinov at exchange.microsoft.com
Thu Jul 13 16:47:21 PDT 2006
I think this is probably due to some changes w/ method dispatch (we'll no longer convert from char to int?). I'll have to ask around to see if that's part of the design or not. As a work around you can do:
chr(ord(a.KeyChar))
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jörgen Stenarson
Sent: Thursday, July 13, 2006 3:17 PM
To: Discussion of IronPython
Subject: [IronPython] Bug in beta9?
Hi
I have hit a change in the behaviour that results in an exception. Is this behaviour expected? My workaround for now is to change chr to str.
/Jörgen
file(tipy.py) used in test:
import System
readkey=System.Console.ReadKey
print "Press a key"
a=readkey(True)
print chr(a.KeyChar)
Test with beta8:
>c:\IronPython-1.0-Beta8\IronPythonConsole.exe tipy.py Press a key d
Test with beta9:
>c:\IronPython-1.0-Beta9\ipy -i tipy.py Press a key Traceback (most recent call last):
File C:\python\pyreadline_branch\pyreadline\console\tipy.py, line 8, in Initialize
File , line 0, in Chr##75
TypeError: Cannot convert Char(d) to Int32
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the users
mailing list