[Tutor] references to containing objects

2008-06-22 Thread John Gunderman
I am looking for a way to tell a object the properties of its containing object. For example, I have an object foo, of class Bar, which I have stored in a dict in the object I want to access. Basically: container_object.contained_object["foo"].action() What I want is for the object "foo" to be ab

[Tutor] how to parse a multiple character words from plaintext

2008-02-22 Thread John Gunderman
I am looking to parse a plaintext from a document. However, I am confused about the actual methodology of it. This is because some of the words will be multiple digits or characters. However, I don't know the length of the words before the parse. Is there a way to somehow have open() grab someth

[Tutor] namespaces and the __dict__ function?

2008-01-25 Thread John Gunderman
I am new to python and have found both the concept of namespaces and the __dict__ function to be rather confusing, and I cant find any good explanations on the web. Could any of you give me a good explanation of these? And for __dict__, is is the same thing as __str__ except in string form, or d