I'm keen to drink some modern dynamic language koolaid, so I've believed all the stuff on Michael Foord's blog and podcasts, I've bought his book (and read some of it), and I added an embedded IPy runtime to a large existing app a year or so ago (though that was for someone else and I didn't really use it myself).
Now I need to do some fairly simple code generation stuff, where I'm going to call a few methods on a few .net objects (custom, C#-authored objects), create a few strings, write some files, etc.
The experience of trying this leaves me feeling like the little boy who thinks he's the only one who can see that The Emperor has no clothes on. If you're using IronPython, I'd really appreciate knowing how you deal with the following aspects of it:
I really want to believe in this stuff, so I am still working on the assumption that I've missed something. I would really like to know how other people are dealing with IPy, particularly if they're doing it in a way which doesn't feel like we've just lost 15 years'-worth of tool development.
Update: (July 2010) This question's looking quite dated, now that there are both official IronPython Tools for VS and PyCharm both of which show a lot of promise and neither of which was around when I wrote it. Thanks to everyone who answered. To those of you who are happy without automatic refactoring tools, can I recommend that you never, ever, use an IDE with good automatic refactoring. After you have, you'll wonder why you thought you were ever happy with find-replace, and you'll never want to work without it again. If nothing else, the ability to instantly rename identifiers without worrying about replacing the wrong bit of text changes your whole approach to naming stuff.
IronPython works as an extension to the . NET Framework, but it can also be used by . NET projects to take advantage of Python's scripting power. Other than that, since IronPython is a real implementation of Python itself, there's no need to learn a new language or extra features if you already know Python.
If you have installed IronPython from NuGet packages and you want modules from the CPython Standard Library then the best way to do it is by installing the IronPython. StdLib NuGet package which is from the same authors of IronPython .
IronPython is an open-source implementation of the Python programming language which is tightly integrated with . NET. IronPython can use . NET and Python libraries, and other .
This means that IronPython can be used for client-side scripting in the browser. IronPython is a Python compiler. It compiles Python code to in memory bytecode before execution (which can be saved to disk, making binary only distributions possible).
do you use the .NET framework without Intellisense?
Yes. I solely use emacs with IronPython. "M-/" is good enough for me. I occasionally switch to Reflector and MSDN when I really need information on the SDK.
Refactoring
You actually mean "Automatic Refactoring" when you said "Refactoring". I do a lot of Refactoring while coding. It could be better with some automation. But I'm fine with manual refactoring. It also force me to include more tests. I've never use any IDE with refactoring feature extensively, perhaps that's why I'm not suffering. Simple search-and-replace is fine for me.
Crippling startup time
Yes, this is my MAJOR pain, eventhough I'm working on 3GHz Quad-core with 4G Ram, it does takes 50s to run 359 test-cases. Half of that time (25s) is the startup time !! It seems IronPython perform some very heavy processing task when importing large module. I'm now planning to spit my tests into parts to mitigate this pain.
Interactive hacking - Do you use the console?
I use console occasionally, when I want to try some adhoc idea. Don't have problem with it. Most of the time I wrote my thought into unit-test, however.
Debugging - what's the story here?
If debugging means break-point and variable-inspection. I solely use print statement for that stuff. The kind of application I'm working on is about to live and keep being maintained for at least a decade. To handle defective code, I only bet on 3 things: comprehensible-code, unit-test and extensive-logging.
Unit testing
I never come close to any tool you mention. Just use unittest.TextTestRunner. Beside the horrible startup time, I do not have any other complains.
** UPDATED **
I just finish upgrading to IPy 2.6B1 with phenomenal result. The startup time reduce from 25s to 6s and my overall testing time reduce from 50s to 16s !!!
AMAZING !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With