Darrell Hawley: Home Page

Friday, May 16, 2008

IronPython in Toledo

I stopped down in Toledo on Tuesday to talk to the Northwest Ohio .NET Usergroup about IronPython. The talk went well, though the demo gods frowned upon me during my presentation. It all boiled down to adding my Python installtion to my IronPython path.

  

import sys
sys.path.append("c:\python25\lib")
import random



I kept getting a TypeError exception which I had not seen while building my demos. As it turns out, the reason I had not seen them was because I had been running them via Visual Studio using Ctrl+F5 (Start without Debugging) effectively masking the exception. During the demo, I was simply hitting F5 which of course displayed my dirty laundry for all to see. This doesn't solve the problem but certainly explains the behavior change. Though I'm not absolutely sure what the root cause is, I'm almost certain the problem is that I was trying to get code written for CPython to run inside IronPython. This definitely merits a bit more research.

0 Comments:

Post a Comment

<< Home