structuring a package?

Torsten Mohr tmohr at s.netic.de
Mon Jan 5 07:12:57 EST 2009


Hello James,

>> That way i'd have to structure the code like this:
>>
>> graphic/
>>  __init__,py  (GraphicObject)
>>  square.py (Square)
>>  circle.py (Circle)
>>
>> Does that make sense like this?
> 
> This seems perfectly acceptable.

Thanks for that hint.  Do you see a way that i could write in circle.py:

circle.py:

import graphic

class Circle(graphic.GraphicObject):
.....

if __name__ == '__main__':
    abc = Circle()
    abc.some_test_code()


Thanks for any hints,
Torsten.




More information about the Python-list mailing list