[IronPython] Two questions...

Peter Drayton pdrayton at microsoft.com
Mon Aug 16 04:56:19 CEST 2004

1. For .NET on Windows, one uses IronPythonConsole.exe scriptname.py to
execute a script. In case you're curious, __main__.exe is an artifact of
the static compilation feature that is only partially implemented for
now. I've not tried on Mono, but since IronPythonConsole.exe is itself a
managed app, you might try "mono IronPythonConsole.exe scriptname.py".

2. You are correct that compilers /for/ .NET do not have to be written
/in/ .NET. Examples of this include the MS C#, VB & MC++ compilers - all
written in unmanaged code. However, for languages like Python and
JavaScript with dynamic features such as eval, one needs access to a
compiler at runtime. While this could be done with an unmanaged compiler
linked in via IJW, P/Invoke, etc. it's often easier (and sometime
better) to have the compiler itself be managed code. IronPython is one
example of this, another is the JScript.NET compiler included in Rotor.


-----Original Message-----
From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Hal Fulton
Sent: Sunday, August 15, 2004 11:00 AM
To: users-ironpython.com at lists.ironpython.com
Subject: [IronPython] Two questions...

I've been playing with IronPython for a few hours, and I have a couple
of questions:

1. I'm using Mono on Linux. It's unclear to me how to invoke
    IP... is it like this?
      mono __main__.exe scriptname.py
    When I try that, it complains about winforms or some such.

2. I'm trying to grasp the overall concept here. Is there a
    good reason this is all written in C#?

    By that, I mean: Wouldn't it be possible to change just the
    code generation pieces of the Python interpreter/compiler?

    It seems to me that "a compiler running on mono" is not
    necessary if we want "a compiler that generates code that
    runs on mono." Am I missing something?

Hal Fulton

users-ironpython.com mailing list
users-ironpython.com at lists.ironpython.com

More information about the Ironpython-users mailing list