[Tutor] Default class in module
Jan Eden
lists at janeden.org
Tue Aug 9 15:55:01 CEST 2005
Hi,
I'd like to pack some modules in a package. Each module contains a single class, which forces me to
from Pythonsite.Show import Page
page = Page()
...
class Page(Site.DB): #class DB from module Site in package Pythonsite
...
Is there a way to define a default class for a module which would me allow to
from Pythonsite import Show
page = Show() #page as an instance of default class in Show
class Page(Site): #Page as a subclass of default class in Site
Thanks,
Jan
--
There's no place like ~/
More information about the Tutor
mailing list