Dec 14, 2011 at 4:27 PM

Can you confirm if the combination of IronPython/PTVS and WPF are working correctly? When I run a very basic code where I have included a button on the WPF form, when I run the debugger, none of the tools I have included on the window show on the window. However, if I run C# with WPF I can design the window and get the tools to show when I run the debugger. Any input will be much appreciated. Thanks.

Dec 14, 2011 at 4:43 PM

Yep, here's what I get w/ 1.1 alpha:

1. File->New Project and select "IronPython Wpf Application".

2. Double click on WpfApplication#.xaml in solution explorer

3. Click on ToolBox, expand All WPF Controls, and drag a Button onto the designer

4. Goto Properties and name the button Foo

5. Double click on the button to add an event handler

6. Modify the source code to import MessageBox from System.Windows in addition to Application and Window

7. Add MessageBox.Show("Hello World") in the Click handler

8. Hit F5 to run

I get a window which has the single button on it and when I click on it a message box is displayed w/ hello world.

This was w/ 1.1 Beta. 

By "tools" do you mean the controls aren't there, or is something else missing?



Dec 15, 2011 at 10:10 AM

Hi, ok its working now, thanks.

I am learning the WPF/VS/PTVS/Ironpython interfaces as I go along :-)

I will test out a few simple programs and try publishing them or .exe them.


Dec 15, 2011 at 3:27 PM
Edited Dec 15, 2011 at 3:31 PM


Could you help please, I am really unsure of the current status of build application to publish are in PVTS, for example I can not seem to do this currently in Iron Python with WPF? However I can do this with other languages in Visual Studio. I would really appreciate some input/help with this.

Please, do not misunderstand me. My experience in programming is limited, I just seem to design, build, publish application in the VS enviroment with ease using the other languages there, I just seem to struggle with the PVTS, perhaps it because I do not fully understand the limitations of it currently in the VS enviroment. Maybe this package is not right for me at the moment?

Thanks for your patience and understand. P.S. I know this is early development so keep up the good work!

Dec 15, 2011 at 5:59 PM

Because Python is an interpreted language it is usually not compiled.  IronPython ships with a script (, in the IronPython install dir in Tools\Scripts\ which will compile scripts into a DLL and an optional EXE.  Those still require that IronPython is installed though. 

Likewise there are similar tools for CPython such as py2exe.

Unfortunately we don't have any integration for either of these in PTVS.  We do have a feature you could vote on if you really want this support: but usually compilation is just an unnecessary step.