Re: Cross-module imports?

2006-01-23 Thread Matthias Kaeppler
Ant wrote: If you have to trick the compiler like this though, I'd take a good look at *why* you want to couple the modules so tightly in the first place! Yeah, you're right. I think loosening up the coupling by introducing a module which holds common shared data is probably a good idea

Re: wxPython or wxWidgets

2006-01-23 Thread Matthias Kaeppler
Marc 'BlackJack' Rintsch wrote: wxPython are the Python bindings to wxWidgets which is a C++ library. Don't want to hijack the thread, but since it's answered already: Has wxWidgets finally arrived at migrating to GTK2? ^^ If so, I might consider using wxPython instead of pygtk for that small

Cross-module imports?

2006-01-22 Thread Matthias Kaeppler
Hi, I am getting strange errors when I am importing modules cross-wise, like this: # module A import B var1 = x B.var2 = y # module B import A var2 = z print A.var1 The error messages are not even sane, for example the interpreter complains about not finding 'var1' in module A. Is there a

Re: PyXML: SAX vs. DOM

2006-01-21 Thread Matthias Kaeppler
Ivan Herman wrote: I know this is not the ideal answer, but maybe it helps... It does, thanks Ivan. Regards, Matthias -- http://mail.python.org/mailman/listinfo/python-list

PyXML: SAX vs. DOM

2006-01-20 Thread Matthias Kaeppler
Hi, I have to say I am confused about the documentation on pyxml.sf.net. When I want to use DOM, I effectively am using a class called Sax2? ^^ I also have to catch SAXExceptions, which reside in xml.sax._exceptions. I thought DOM and SAX are two completely different things. Why is PyXML mixing

Re: PyXML: SAX vs. DOM

2006-01-20 Thread Matthias Kaeppler
Oh and: Where can I find an API reference for PyXML? Am I supposed to /guess/ which methods and attributes e.g. Sax2 supplies? :D Thanks again, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: PyXML: SAX vs. DOM

2006-01-20 Thread Matthias Kaeppler
Steven Bethard wrote: I don't have an answer to your real question, but if you're not committed to a particular XML package yet, you might consider ElementTree: http://effbot.org/zone/element-index.htm The API is much simpler, and the package has a much more sane organization. ;)

Re: OO in Python? ^^

2005-12-11 Thread Matthias Kaeppler
Heiko Wundram wrote: Brian Beck wrote: class D1(Base): def foo(self): print D1 class D2(Base): def foo(self): print D2 obj = Base() # I want a base class reference which is polymorphic if (need D1): obj = D1() else: obj = D2() I have no idea what you're trying to do

Re: OO in Python? ^^

2005-12-11 Thread Matthias Kaeppler
Brian Beck wrote: def foo(self): raise NotImplementedError(Subclasses must implement foo) That's actually a good idea, though not as nice as a check at compile-time (jesus, I'm probably talking in C++ speech again, is there such a thing as compile-time in Python at all?!) Another thing

Re: OO in Python? ^^

2005-12-11 Thread Matthias Kaeppler
That was quite insightful Martin, thanks. Regards, Matthias -- http://mail.python.org/mailman/listinfo/python-list

Re: OO in Python? ^^

2005-12-11 Thread Matthias Kaeppler
gene tani wrote: http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing http://dirtsimple.org/2004/12/java-is-not-python-either.html http://dirtsimple.org/2004/12/python-is-not-java.html http://idevnews.com/PrintVersion_CaseStudies.asp?Search3=web+servicesGo2=GoID=118

Re: OO in Python? ^^

2005-12-11 Thread Matthias Kaeppler
[EMAIL PROTECTED] wrote: Just follow the links. I'll try ;-) -- http://mail.python.org/mailman/listinfo/python-list

OO in Python? ^^

2005-12-10 Thread Matthias Kaeppler
Hi, sorry for my ignorance, but after reading the Python tutorial on python.org, I'm sort of, well surprised about the lack of OOP capabilities in python. Honestly, I don't even see the point at all of how OO actually works in Python. For one, is there any good reason why I should ever