[IronPython] Newbie question about importing from System.Windows

Funke, Matt Matt.funke at vishaypg.com
Fri May 7 20:46:25 CEST 2010


Many thanks -- I found the answer just before receiving this, exactly by stumbling across avalon.py.  Sorry to take up your time.

 -- Matt Funke

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Dino Viehland
> Sent: Friday, May 07, 2010 2:14 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Newbie question about importing from
> System.Windows
> 
> Matt wrote:
> > I'm running IronPython 2.6.1 for .NET 4.0, and have installed Visual
> Studio
> > 2010 and Silverlight 4SP2.  I tried to import
> System.Windows.Controls, but got
> > an error that "Windows" does not exist.  Trying to run ipy from the
> command
> > line and running this:
> >
> > >>> import System
> > >>> dir(System)
> >
> > ... confirms that there is no "Windows" entry.  Could another
> "System" be
> > taking precedence?  How can I find out?
> >
> > Thanks in advance for any help you can lend.
> 
> 
> You'll need to do a clr.AddReference('PresentationCore') call before
> you can
> access types related to WPF.  IronPython includes an avalon.py in the
> Tutorial directory which will do this as well as adding references to
> PresentationFramework and WindowsBase which are other assemblies that
> make
> up WPF.
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list