Re: [Python.NET] Cast PyObject to RoutedEventHandler
Denis Akhiyarov <[email protected]> Tue, 19 Jun 2018 23:18:00 -0500
| Newsgroups | gmane.comp.python.dotnet |
|---|---|
| Message-ID | <CALxxJLT_p3YnGk=gDkf-_OgCKp+Hb8=h8JA=S4Tn_wJgfiDLxA@mail.gmail.com> |
Have you tried @clrmethod decorator? https://github.com/pythonnet/pythonnet/blob/master/src/runtime/resources/clr.py#L54 https://github.com/pythonnet/pythonnet/blob/master/src/tests/test_clrmethod.py#L14 On Tue, Jun 19, 2018 at 10:37 AM, WARD Steve <Steve.Ward-EXCgb/[email protected]> wrote: > Can anyone tell me how to cast or Convert (or use a TryGet, or As > whatever…), a PyObject (a Python function), to a C# RoutedEventHandler? > > > > The Python function: > > > > def OnStartButton(sender,args): > > #do stuff > > pass > > > > Thanks > > Steve > ____________________________________________________________ > _______________ > This e-mail is confidential and is for the addressee only. Please refer > to > www.oxinst.com/email-statement for regulatory information. > > _________________________________________________ > Python.NET mailing list - [email protected] > https://mail.python.org/mailman/listinfo/pythondotnet > > _________________________________________________ Python.NET mailing list - [email protected] https://mail.python.org/mailman/listinfo/pythondotnet