Wiley.com
Print this page Share

Professional IronPython

ISBN: 978-0-470-54859-2
Paperback
480 pages
April 2010
Professional IronPython (0470548592) cover image
This title is out-of-print and not currently available for purchase from this site.

Introduction xvii

Part I: Introducing IronPython

Chapter 1: Discovering IronPython 3

An Overview of IronPython 4

Getting IronPython 7

Understanding the Dynamic Language Runtime 11

Using the IronPython Console 12

Using the IronPython Windowed Environment 20

Creating Your First Application 21

Using IronPython Constructively 22

Chapter 2: Understanding the IronPython Basics 23

Using Visual Studio to Create IronPython Applications 24

Understanding the Use of Indentation and Capitalization in IronPython 31

Considering Data Types in IronPython 33

Exploring the IronPython Modules 36

Interacting with the IronPython Environment 40

Using IronPython Constructively 41

Chapter 3: Implementing Structured Language Elements 45

Stringing Statements Together 46

Selecting Between Options 48

Creating Loops 51

Performing Enumerations 53

Using IronPython Constructively 54

Chapter 4: Using Arrays and Collections 55

Working with Tuples, Lists, and Arrays 56

Working with the Collections Module 72

Using Dictionaries 74

Using IronPython Constructively 76

Chapter 5: Interacting with Structures and Objects 77

Working with Existing Objects 78

Creating New Objects 89

Using IronPython Constructively 93

Chapter 6: Using the Python Standard Library 97

Considering the Standard Library Features 98

Obtaining and Installing the Python Standard Library 100

Accessing the Standard Library from IronPython 102

Using the Standard Library Features 104

Using IronPython Constructively 115

Chapter 7: Accessing the .NET Framework 117

Importing the .NET Framework Assemblies 118

Using .NET Data Types 126

Interacting with .NET Framework Elements 128

Working with Generics 135

Using IronPython Constructively 137

Chapter 8: Creating Windows Forms Applications 139

Working without a Visual Designer 140

Defining Windows Forms 142

Interacting with Predefined and Custom Events 150

Using IronPython Constructively 159

Chapter 9: Interacting with COM Objects 161

An Overview of COM Access Differences with Python 162

Choosing a Binding Technique 164

Defining an Interop DLL 167

Performing Late Binding Using Activator.CreateInstance() 186

Performing Late Binding Using Marshal.GetActiveObject() 189

Using IronPython Constructively 191

Chapter 10: Using IronPython for Administration Tasks 193

Understanding the Command Line 194

Interacting with the Environment 207

Starting Other Command Line Applications 218

Providing Status Information 220

Using IronPython Constructively 222

Chapter 11: Developing AS P.NET Applications 223

Considering IronPython Web Application Compatibility 224

Obtaining ASP.NET Dynamic Language Support 224

Creating a Web Site 228

Building a Basic ASP.NET Site Using IronPython 229

Using IronPython Constructively 240

Chapter 12: Debugging IronPython Applications 241

Understanding IronPython Warnings 242

Obtaining Error Information 252

Debugging with the Python Debugger 256

Debugging with the CLR Debugger 260

Using Visual Studio for IronPython Debugging 262

Defining and Using Exceptions 263

Using IronPython Constructively 266

Chapter 13: Working with XML Data 271

Using the .NET XML Functionality 272

Using XMLUtil 276

Using the Python Modules 281

Using IronPython Constructively 286

Chapter 14: Interacting with the DLR 287

Obtaining DLR 288

Working with Hosting APIs 293

Understanding the Extensions to LINQ Expression Tree 298

Considering DynamicSite 300

Working with IDynamicObject 300

Understanding the ActionBinder 304

Understanding the Other DLR Features 305

Using IronPython Constructively 305

Chapter 15: Using IronPython from Other .NET Languages 307

Understanding the Relationship between Dynamic and Static Languages 308

Creating an Externally Accessible IronPython Module 309

Accessing the Module from C# 312

Accessing the Module from Visual Basic.NET 319

Developing Test Procedures for External Modules 321

Debugging the External Module 321

Using IronPython Constructively 324

Chapter 16: Extending IronPython Using C# 325

Understanding the Requirements for an Extension 326

Considering IronPython and Static Language Differences 327

Creating the Simple C# Extension 329

Using C# for User Interface Support 336

Using C# for Win32 Support 348

Using IronPython Constructively 356

Chapter 17: Extending IronPython Using Visual Basic .NET 359

Considering C# and VISUAL BASIC.NET Extension Similarities 360

Creating the Simple Visual Basic.NET Extension 360

Using Visual Basic.NET for User Interface Support 367

Using Visual Basic.NET for Database Support 377

Using IronPython Constructively 386

Using IronPython Chapter 18: for Application Testing 387

Understanding Why You Want to Use IronPython for Testing 388

Considering the Test Environment 389

Testing DLLs 392

Testing Applications 396

Performing Command Line Tests 402

Using IronPython Constructively 404

Chapter 19: Using IronPython with Mono 405

What Is Mono? 406

Obtaining and Installing Mono 410

Creating an IronPython Application with Mono 412

Interacting with Other .NET Languages under Mono 418

Using IronPython Constructively 418

Appendix A: IronPython Diff erences with CPython 421

Appendix B: CPython Extensions for IronPython 433

Index 439

Related Titles

More By This Author

General Programming & Software Development

by Nick Randolph, David Gardner, Chris Anderson, Michael Minutillo
by Allen G. Taylor
by Andrew Curioso, Ronald Bradford, Patrick Galbraith
by Pablo Cibraro, Kurt Claeys, Fabio Cozzolino, Johann Grabner
Back to Top