[Mono-osx] Ironpython on Macosx problem

Sandy Armstrong sanfordarmstrong at gmail.com
Fri Mar 20 16:04:52 EDT 2009


On 03/18/2009 08:19 AM, zenzee wrote:
> Hi,
>
> I installed the latest (Mono 2.2_5 Framework - Universal) package for the
> mac on my macbookpro running 10.5.6 and tried to run this script from the
> terminal:
>
> #!/usr/bin/ipy
>
> import clr
>
> clr.AddReference("System.Windows.Forms")
>
> from System.Windows.Forms import *
>
> class IForm(Form):
>      def __init__(self):
>          self.Text = 'Simple'
>
> Application.Run(IForm())
>
> ==================
>
> I get the following error message:
>
> Version: ImageMagick 6.3.3 03/06/07 Q16 http://www.imagemagick.org
> Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC

I don't know why you're getting this, but it's not part of the error.

> ./simple.py: line 5: syntax error near unexpected token
> `"System.Windows.Forms"'
> ./simple.py: line 5: `clr.AddReference("System.Windows.Forms")'

I get this error, too, running in Linux.  I fixed it by replacing your 
top line with:

#!/usr/bin/env ipy

Hope this helps,
Sandy


More information about the Mono-osx mailing list