#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    145
    Rep Power
    10

    IronPython - C# code?


    Hi, recently I have found IronPython (http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 , http://www.ironpython.com/ ). It is a .net python implementation in C#. When you run a python program using it IronPython converts the code down into C# code. I would like to know if it is possible to get (output) the C# code which is created from running a Python script. I like working in python (I am a lot faster than I am in C#) but I also like the C# (well .net) libs so it would be great to be able to program in python and then have it converted into C# code. Can anyone tell me how this can be done?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    what is happening is exactly the same way python writen c/c++ and how jython can do it. It happens at runtime, it actually creates a more blucky c# app. It doesn't literly "convert" it just translates as it goes to something c# can work with. and from there c# has like a table of information to do what when certain things are passed such.

    i do not beleave there is a way to just code in python and have it output c# code for you. Besides that would be kinda pointless actually. Your better off just learning c#.
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    605
    Rep Power
    65

    Smile


    IronPython does not create C# code. All .Net language use a common language at runtime called CLR by Microsoft. It is this interim language that IronPython uses.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    yes, but the interpriter itself is made with c#, so it is then translated to CLR by c# during runtime.

    kinda in the same fashion that jython and ruglar old python does it.

    CLR is what alows c# and such to run on multiple oses kinda like java does.

IMN logo majestic logo threadwatch logo seochat tools logo