O'Reilly logo

IronPython in Action by Christian Muirhead, Michael Foord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Extending IronPython with C#/VB.NET

This chapter covers

  • Creating class libraries for IronPython

  • .NET attributes and IronPython

  • Calling unmanaged code with P/Invoke

  • Creating dynamic objects with C#/VB.NET

  • Compiling assemblies at runtime

There is a standard mantra about performance when programming with Python (CPython). The mantra goes something like this: “Code in Python first; then profile and optimize your bottlenecks. Finally, if you still need your code to run faster, rewrite the performance-sensitive parts of your code in C.” Okay, as mantras go there are probably snappier ones, but it still contains a lot of wisdom. Of course, with IronPython we wouldn’t drop down to C[1] but into C# or VB.NET instead.

This is an area where IronPython ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required