0

This code is IronPython!
Won't work with CPython.

IronPython - Hello World

import clr
clr.AddReference('System.Windows.Forms')

from System.Windows.Forms import Application, Form, Label

form = Form(Text="Hello World Form")
label = Label(Text="Hello World!")

form.Controls.Add(label)

Application.Run(form)

Editor's note:
This post moved from Python GUI Programming sticky thread.
Please follow the rules of this thread and don't clutter it with questions!
Start your own thread and title it "IronPython Question" or something.

Edited by vegaseat: Rules of this thread

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by jcao219
0

IronPython uses the Windows .NET CLR (Common Language Runtime) & libraries and most of the common Python syntax. The standard CPython is written to be cross platform, and that does not include the CLR.

For IronPython see:
http://www.ironpython.org/

0

IronPython uses the Windows .NET CLR (Common Language Runtime) & libraries and most of the common Python syntax. The standard CPython is written to be cross platform, and that does not include the CLR.

For IronPython see:
http://www.ironpython.org/

It wasn't a question. It was some code that displays a hello world Gui. I thought that I had put it in the right place.

Also, IronPython is relatively cross-platform and cross-browser. There's mono for linux, and the Silverlight plugin.

Edited by jcao219: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.