[Quickfix-developers] RE: bad python example?
Brought to you by:
orenmnero
|
From: Shawn Y. <sya...@ge...> - 2006-01-19 20:43:01
|
Oren, Got it, I think our QuickFIX/Python client is working properly now. = Thanks so much for the assistance! Regards, Shawn -----Original Message----- From: Oren Miller [mailto:or...@qu...] Sent: Thursday, January 19, 2006 12:25 PM To: Shawn Yarbrough Cc: Nick Podosenov Subject: Re: bad python example? Yeah. The only difference between start and block is that start will=20 load the engine up in a new thread, while block will load it in the=20 current thread (hence blocking as long as the engine is running). You would use block if you application is entirely driven off of FIX=20 events (.i.e., someone sends you a message, you do something). In which = case block is sufficient. You want to use something like start (or in=20 your case, calling block in another thread), if you need to process=20 other events as well (user events, market data events, etc). It=20 essentially just gives back control of the main thread to your = application. --oren Shawn Yarbrough wrote: >Thanks! Actually, for Python we are currently trying to get a client = working. Do you think we should we try this block() function for our = Python client, in place of where the start() would have been called in = C++? > > >Shawn Yarbrough >Senior E-Trading Developer >Gelber Group, LLC >(312) 692-2819 >sya...@ge... > > > >-----Original Message----- >From: Oren Miller [mailto:or...@qu...] >Sent: Thursday, January 19, 2006 12:01 PM >To: Shawn Yarbrough >Cc: qui...@li... >Subject: Re: bad python example? > > >Indeed. I think this is because python wasn't happy about running code = >from a thread started outside the runtime environment. The executor=20 >example should be more true to form as it has actually be run through=20 >the interpreter: > >http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/examples/executo= r/python/executor.py?view=3Dmarkup > >You will notice that instead of using start(), a python thread is=20 >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=20 >won't be necessary in the future. > >--oren > >Shawn Yarbrough wrote: > > =20 > >>Hi Oren, >> >>My company is trying to use the QuickFIX engine for the first time,=20 >>both in C++ and in Python. C++ seems to work OK but we are having=20 >>trouble with the Python binding. >> >>This example here looks really old -- it contains several trivial = errors: >> =20 >>http://www.quickfixengine.org/quickfix/doc/html/python/application_2.ht= ml >> >>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 >> >> =20 >> > > > =20 > |