Proper way of handling plug-in methods

2007-01-08 Thread Franck PEREZ
All, My application deals with strings formatting. I have built-in methods but I also expect the user to add its methods in its own .py files (some sort of plugin methods, all user methods should be exposed in my application). Here is the structure I have thought of : formatting.py

Automatic class attribute

2006-02-03 Thread Franck PEREZ
Hello all, Considering the following code : class C(object): ...: observers = [] ...: ...: @classmethod ...: def showObservers(cls): ...: print cls.observers class D1(C): ...: observers = [] #could it be moved in C ? class D2(C): ...: observers

Re: Automatic class attribute

2006-02-03 Thread Franck PEREZ
On 2/3/06, Kirk McDonald [EMAIL PROTECTED] wrote: Franck PEREZ wrote: Hello all, Considering the following code : class C(object): ...: observers = [] ...: ...: @classmethod ...: def showObservers(cls): ...: print cls.observers class D1(C

[ANN] XML Serializer module

2006-01-12 Thread Franck PEREZ
Dear all, I wished to announce here my first Python module : XML Serializer. It recursively serializes and deserializes Python objects and their children. Children may be an instance's attributes, or list/dict/tuple elements. When serializing an instance, you may customize the attributes which

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread Franck PEREZ
On 11/25/05, Sebastien Douche [EMAIL PROTECTED] wrote: On 11/25/05, Franz Mueller [EMAIL PROTECTED] wrote: Hi, Hi Franz! :) which of the following books would you recommend: Dive into Python or Beginning Python: From Novice to Professional? Both are very good books but I suggest the

Importing a class without knowing the module

2005-11-17 Thread Franck PEREZ
Hello, I'm developing a small XML marshaller and I'm facing an annoying issue. Here's some sample code: ### My test application class Foo(object): #The class I'd like to serialize pass import myMarshaller foo = Foo() s = myMarshaller.dumps(foo) #works fine, spits