Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IronPython on Mono howto

125 views
Skip to first unread message

san...@gmail.com

unread,
Sep 5, 2006, 10:50:27 PM9/5/06
to
Skip wrote:
For those of us who have never used IronPython or Mono, is there a
quick start document laying about somewhere? It wasn't clear to me
where to even look.

Okay, here we go:

1. Download IronPython

Go to http://www.codeplex.com/IronPython. Click Releases tab. Click
IronPython-1.0-Bin.zip or IronPython-1.0-Src.zip. You need to agree to
the license. Read it if you haven't.

2. Download Mono

Go to http://www.mono-project.com/. Click "download now" icon
(topright). DO NOT DOWNLOAD 1.1.13, IT WON'T WORK. Download according
to your platform and install in the usual way. If you are using Debian
Unstable like me, apt-get install mono is enough. For Linux users not
covered, but using x86 architecture, I highly recommend "Linux
Installer for x86 (All distributions)" download. It's a graphical
installer, can be installed under your home directory not to distrub
package managers, and uninstalls cleanly.

3. Run (Binary case)

Unzip IronPython-1.0-Bin.zip. It unzips to IronPython-1.0 directory.
Change to it. Run "mono ipy.exe". Make sure mono --version shows the
version you installed; you may have non-working (for IronPython) 1.1.13
already installed on your system. You will see:

IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>>

4. Compile and Run (Source case)

Unzip IronPython-1.0-Src.zip. It unzips to IronPython-1.0 directory.
Change to it. Change to Src directory under it. Edit makefile.

1) Change "CSC=csc" to "CSC=gmcs".
2) Change "mkdir ..." to "mkdir -p".

Make. "Compilation succeeded". Change to the parent directory and you
will see newly compiled ipy.exe and DLLs. Run as in 3.

Seo Sanghyeon

alex23

unread,
Sep 6, 2006, 1:40:03 AM9/6/06
to
san...@gmail.com wrote:
> Okay, here we go:
> 1. Download IronPython

Kudos for taking the time!

Nick Craig-Wood

unread,
Sep 7, 2006, 7:30:06 AM9/7/06
to
san...@gmail.com <san...@gmail.com> wrote:
> Okay, here we go:
[snip]

Thanks for those good instructions - they worked well!

I tried running a test program under mono/linux.

I found I needed to add

import sys
sys.path.append("/usr/lib/python2.4")

As per the FAQ to the code. Setting this in an environment var would
be nice but I didn't find one.

The code then ran fine. (Its a test suite for my sudoku solver.)

$ mono ipy.exe ~/Python/sudoku.py -t
...........
----------------------------------------------------------------------
Ran 11 tests in 5.533s

Compared to

$ python2.4 ~/Python/sudoku.py -t
...........
----------------------------------------------------------------------
Ran 11 tests in 1.637s

It seems to take about a second to start IronPython vs ~15 ms for
Python2.4, eg

$ time mono ipy.exe -c pass

real 0m1.034s
user 0m1.000s
sys 0m0.036s

$ time python2.4 -c pass

real 0m0.015s
user 0m0.008s
sys 0m0.007s

Over all I'm very impressed - it is great to have a new implemention
of Python. I'm not sure mono is showing it off to its full extent
though!

--
Nick Craig-Wood <ni...@craig-wood.com> -- http://www.craig-wood.com/nick

sk...@pobox.com

unread,
Sep 7, 2006, 9:35:25 AM9/7/06
to san...@gmail.com, pytho...@python.org

sanxiyn> For those of us who have never used IronPython or Mono, is
sanxiyn> there a quick start document laying about somewhere? It wasn't
sanxiyn> clear to me where to even look.

sanxiyn> Okay, here we go:
...

Thanks. Worked like a charm. Like others I noticed the apparent
performance drop. I presume that's more a comment on the state of
optimization in Mono than on IronPython itself.

One thing I did find especially annoying though was that none of the editing
keys worked. DELETE, BACKSPACE, Ctrl-U. All just inserted themselves.
Ctrl-D didn't exit. (I had to "raise SystemExit" to exit.)

Is this a known problem? Is it a Mono thing or an IronPython thing? Any
workaround?

Thx,

Skip

Marc 'BlackJack' Rintsch

unread,
Sep 7, 2006, 11:57:29 AM9/7/06
to

> One thing I did find especially annoying though was that none of the editing
> keys worked. DELETE, BACKSPACE, Ctrl-U. All just inserted themselves.
> Ctrl-D didn't exit. (I had to "raise SystemExit" to exit.)
>
> Is this a known problem? Is it a Mono thing or an IronPython thing? Any
> workaround?

The `boo` shell and the `Nemerle` shell can be quit with Ctrl-D under
Mono, so I guess it's an `IronPython` thing.

Ciao,
Marc 'BlackJack' Rintsch

san...@gmail.com

unread,
Sep 7, 2006, 10:19:30 PM9/7/06
to
sk...@pobox.com wrote:
> One thing I did find especially annoying though was that none of the editing
> keys worked. DELETE, BACKSPACE, Ctrl-U. All just inserted themselves.
> Ctrl-D didn't exit. (I had to "raise SystemExit" to exit.)
>
> Is this a known problem? Is it a Mono thing or an IronPython thing? Any
> workaround?

It is a known problem. It is a Mono bug. (ncurses-based colored console
is not really complete.) There is a workaround.

Apply
http://sparcs.kaist.ac.kr/~tinuviel/download/patch-ironpython-mono-console

Seo Sanghyeon

sk...@pobox.com

unread,
Sep 7, 2006, 11:00:52 PM9/7/06
to san...@gmail.com, pytho...@python.org

>> One thing I did find especially annoying though was that none of the
>> editing keys worked.

Seo> It is a known problem. It is a Mono bug. (ncurses-based colored
Seo> console is not really complete.) There is a workaround.

Thanks, it worked perfectly. I guess the white text on the white background
prevented the Mono developers from seeing that the editing characters were
self inserting. ;-)

Skip

Alex Martelli

unread,
Sep 9, 2006, 8:09:21 PM9/9/06
to
<sk...@pobox.com> wrote:

On MacOSX, my workaround for the white-on-white behavior of
IronPython+Mono on Apple's Terminal was to try other terminal emulators
-- Terminator worked fine (display-wise). But the editing remains off,
so I'll be glad to try the suggested workaround (if and when
sparcs.kaist.ac.kr responds...:-).


Thaks,

Alex

0 new messages