Chapter 7. Accessing the .NET Framework
WHAT'S IN THIS CHAPTER?
Gaining access to the .NET Framework from IronPython
Working with .NET data types in your application
Using .NET classes within your application
Creating applications that use generics
Chapter 6 emphasized the Python portion of IronPython. As you learned in that chapter, IronPython doesn't quite provide full Python capability, but it comes very close. In this chapter, you discover the .NET capabilities of IronPython. In this case, you'll see that IronPython has its own take on the .NET Framework but that it does provide you with full access.
Of course, before you can work with the .NET Framework in IronPython, you need to know how to import the assemblies. It turns out that you have several levels of import capability that you can use to work with assemblies in different ways. In most cases, you'll perform a standard import and use the .NET assemblies much as you would any other IronPython class.
The .NET Framework provides strict data typing and a wider range of data types than Python does. You need to know how to use these data types within IronPython in order to write applications that make full use of the .NET Framework. The second section of this chapter addresses this need.
Once you know about the data types, you can begin working with classes. This chapter provides you with an overview of the process. You get more details as the book progresses. However, this chapter is important because it explains basics you absolutely ...
Get Professional IronPython™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.