Skip to content

Instantly share code, notes, and snippets.

@mnzk
Created May 12, 2012 11:03
Show Gist options
  • Save mnzk/2665840 to your computer and use it in GitHub Desktop.
Save mnzk/2665840 to your computer and use it in GitHub Desktop.
sample_wpf.py
from __future__ import print_function
import wpf
from System.Windows import Application
from System.Windows import Window
flip = lambda f, a: lambda b: f(b, a)
props = {'__init__' : flip(wpf.LoadComponent, 'w.xaml')}
win = type('', (Window,),props)()
win.btnSample.Click += lambda *_:print("hello")
Application().Run(win)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment