[Quickfix-developers] Re: bad python example?
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2006-01-19 18:01:09
|
Indeed. I think this is because python wasn't happy about running code from a thread started outside the runtime environment. The executor example should be more true to form as it has actually be run through the interpreter: http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/examples/executor/python/executor.py?view=markup You will notice that instead of using start(), a python thread is created which then calls acceptor.block(). This pretty much duplicates what acceptor.start() would be doing underneath. I'll look into seeing having swig add a native start() method so that you this extra step won't be necessary in the future. --oren Shawn Yarbrough wrote: > Hi Oren, > > My company is trying to use the QuickFIX engine for the first time, > both in C++ and in Python. C++ seems to work OK but we are having > trouble with the Python binding. > > This example here looks really old -- it contains several trivial errors: > > http://www.quickfixengine.org/quickfix/doc/html/python/application_2.html > > Also, there's a major error. The "acceptor.start()" line is confusing > us because there is no start function in class Acceptor in Python (but > there is in C++). > > Can you give us any pointers? > Thanks, > > > Shawn > |