Thursday, May 31, 2007

Spawning a process in IronPython

I've been using IronPython recently as a scripting language because its string handling and ability to provide structured programming support is so much richer — and accessibly documented — than old .BAT & .CMD file programming supports. The downside is that the old style files make launching sub-processes trivial. So, in the spirit of DRY (Don't Repeat Yourself), here's the file to import.

And yes, this is really another example of how to use .Net rather than how to use Python.

1 comment :

Michael Foord said...

Hello Steve.

Thanks for adding your example for the cookbook. By sheer chance I was using the Process class today and added an example before I saw yours.

I've merged your code with mine in the 'launching a sub-process' page, and added a link there.