1

I'd like making IronPython WPF app' but VS says:

ImportError: No module named 'wpf'

I tried this link but it doesn't work. I am not sure about where doing this:

import clr
clr.AddReference('IronPython.Wpf')
import wpf

When I write this it says

ImportError: No module named 'clr'

Community
  • 1
  • 1
Newokmyne
  • 65
  • 2
  • 10

1 Answers1

0

First you might not want to have your import and something else on the same line. Always put your imports before whatever calls to a function your are making!

import clr
import wpf

clr.AddReference('IronPython.wpf')

and I believe your file should be in the same directory for .Addreference() to locate it. as far as I know, the latest IronPython 2.7 should come prepackaged with wpf, but then again your version might differ. I would recommend to update to the latest, or download the modules you are missing and drop them in the IronPython repository at their appropriate location!

Hope this helps!

Castiel
  • 547
  • 1
  • 4
  • 10