Can dictionaries be nested?

2006-01-11 Thread techiepundit
I'm parsing some data of the form: OuterName1 InnerName1=5,InnerName2=7,InnerName3=34; OuterName2 InnerNameX=43,InnerNameY=67,InnerName3=21; OuterName3 and so on These are fake names I've made up to illustrate the point more clearly. (the embedded device device can't produce XML and

Re: C regex equiv to Python implementation?

2006-01-07 Thread techiepundit
Ganesan, I'm trying to stay portable between Windows and Linux. My app will run on Linux when deployed. But we do a lot of simulation on Windows because of better dev tools available on Windows. So I really want a regular expression implementation that'll compile under MS VS 2003 C++ and also und

C regex equiv to Python implementation?

2006-01-06 Thread techiepundit
I've been writing code in Python to prototype part of an application. I've used the re regular expression pattern matcher. Now I have to take what I've written and recode it in C to fit in an existing C app. Anyway, is there a way to use the re regular expression evaluator in C? Is it written in C

Re: List index method for complex list item types?

2005-12-30 Thread techiepundit
Mike, I'm trying to figure out dictionaries using the documentation. Clicking on "dictionary type" takes me to "2.3.8 Mapping Types -- classdict". Is that the documentation for the dictionary type? If so, I do not see an "append" or "add" or "insert" method defined in the list of methods on that p

On threads and constructors

2005-12-30 Thread techiepundit
I have a class: class ServerThreadManager(threading.Thread): def __init__(self): threading.Thread.__init__(self) # and a bunch of constructor statements def run(self): self.ReqHandlingLoop() # and a bunch of other methods ServerObj = ServerThreadManager() pr

List index method for complex list item types?

2005-12-30 Thread techiepundit
I'm a Python newbie who just started learning the language a few weeks ago. So these are beginner questions. I have a list of sockets that I use for select.select calls like this: ReadList,WriteList,EventList = select.select(self.SocketList,[],[],3) In parallel with that list of sockets I want s