"Turns out building this app in IPy was fairly straightforward, with a few pitfalls. I wasted half a day digging thru data binding before realized that data binding against IPy objects works out of the box - but only if you type the case of the property correctly (Title != title)..."
"Over the next several posts, I’m going to show you all the code for this app. It’s pretty small, only about 50 lines of app-specific python code + 50 lines of XAML to describe the window."
from System.IO import File
from System.Windows.Markup import XamlReader
with File.OpenRead(filename) as f:
He hooks up the events to the WPF Window loaded from the XAML and even shows a bit of C# with custom hooks to make it play nicely with IronPython.
thread pool. To keep things clean (and Pythonic) he uses decorators to execute functions in the background or on the UI thread.
SynchronizationContext instead of the WPF dispatcher.