Quantcast

MessageCracker - python

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MessageCracker - python

Simon Watson
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hi all,

I'm doing some testing using quickfix with python - and don't seem to be able to use the MessageCracker.

Googling suggests this is simply not supported in python - is this correct?

Cheers,

Simon

------------------------------------------------------------------------------

_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MessageCracker - python

Berto
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/

in pyton I did following:
from bs4 import BeautifulSoup as Soup

class Application(fix.Application):
def fix_dict(self):
        datadict={}
        obj="/.../.../.../QuickFix/Dictionary/FIX42.xml"
        handler = open(obj).read()
        soup = Soup(handler,'xml')
        for s in soup.findAll('fields'):
            for m in s.findAll('field'):
                msg_attrs =m.attrs
                datadict[int(msg_attrs["number"])]=msg_attrs["name"]
        return datadict

so given a tag => you get the field name once message fromApp

Hope this helps


------------------------------------------------------------------------------
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Loading...