A startup puzzle

Peter Otten __peter__ at web.de
Mon Sep 29 21:05:12 CEST 2003


Peter Otten wrote:

Oops! My consideration does not work with 
from leoGlobals import * 
as the rebinding is not propagated. The following seems to work although I
do not know if this is approved Python:

leoGlobals.py, second try:
from leoApp import Application

class Dummy(object):
    pass

app = Dummy()

def createApp():
    app.__class__ = Application
    app.__dict__ = Application().__dict__


Peter




More information about the Python-list mailing list