Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68729
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-03-21 17:22 -0700 |
| References | (1 earlier) <lgfucb$4q7$1@speranza.aioe.org> <e469fc0a-596c-40b6-8b27-751a4fe84d85@googlegroups.com> <op.xc1uldoj5079vu@gnudebeest> <488fbd2c-1b99-482d-a282-f3f20defbc68@googlegroups.com> <lghqk7$suf$1@speranza.aioe.org> |
| Message-ID | <c451c8e3-90fb-40b9-85a5-cdcb6e9efb8a@googlegroups.com> (permalink) |
| Subject | Re: CallBack function in C Libraries. |
| From | fiensproto@gmail.com |
Le vendredi 21 mars 2014 16:50:18 UTC, Mark H. Harris a écrit : > > def TheProc(): <================== you moved c_int from here ... > > > fpgui.fpgFormWindowTitle(0, 'Boum') > > > return 0 > > CMPFUNC = CFUNCTYPE(c_int) <============ and placed it here ... > > > ... it wasn't "expecting" exactly one parameter. So, your python > > traceback no longer warns about the parameter 'mismatch' in the defined > > function TheProc(). > > > > I'm not picking on you, but this error was obvious; as was it's > > solution, so I'm just wondering ? > Hello and thanks for answer. Hum, i do not understand why, but the code is working ... ;-) Some remarks : > def TheProc(): > fpgui.fpgFormWindowTitle(0, 'Boum') > return 0 <================== that does the trick... And > > CMPFUNC = CFUNCTYPE(c_int) <======== 1 argument minimum.. It seems that CFUNCTYPE() want minimum 1 argument, even if TheProc() is a simple procedure, without argument... Hum, it is my really first program in Python and im impressed how easy it was to do my Pascal (fpc) library work! Im busy to try to do it work for java programs but it is not so easy. By the way, is it possible to hide the terminal-window ? That library is a complete graphic widget set (from Form to Stringgrid and more). So, i will prefer that the console was hided... And last question, how to retrieve the directory of the main Python application ? Many thanks.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
CallBack function in C Libraries. fiensproto@gmail.com - 2014-03-20 16:16 -0700
Re: CallBack function in C Libraries. Mark H Harris <harrismh777@gmail.com> - 2014-03-20 18:42 -0500
Re: CallBack function in C Libraries. fiensproto@gmail.com - 2014-03-20 16:56 -0700
Re: CallBack function in C Libraries. 88888 Dihedral <dihedral88888@gmail.com> - 2014-03-20 17:04 -0700
Re: CallBack function in C Libraries. "Rhodri James" <rhodri@wildebst.org.uk> - 2014-03-21 02:01 +0000
Re: CallBack function in C Libraries. fiensproto@gmail.com - 2014-03-21 05:02 -0700
Re: CallBack function in C Libraries. Mark H Harris <harrismh777@gmail.com> - 2014-03-21 11:50 -0500
Re: CallBack function in C Libraries. fiensproto@gmail.com - 2014-03-21 17:22 -0700
csiph-web