On Dec 22, 7:05 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > petr.jakes.tpc wrote: While you could either alter the textfile to > > >>> import __main__ as displeje_pokus > > or the module along the lines of > > # not recommended! > from displeje_pokus import TextyDispleje > if __name__ == "__main__": > # doctest > else: > class TextyDispleje(SQLObject): > pass > > the clean way to fix the problem is to use a separate script to invoke the > doctest. > > Peter
Peter, thanks for your reply. I will try to live with the >>> import __main__ as displeje_pokus in the text file. Anyway, using this, it looks like I have to assign all functions/ methods to a local name like: myFunction=displeje_pokus.myFunction to avoid to write modul name (displeje_pokus) in front of the each function/method calling. Do you think there is a way how to protect the text file contents against such a "assigning hell"? Petr -- http://mail.python.org/mailman/listinfo/python-list