Importing problems

Thomas Guettler guettli at
Mon Nov 8 12:34:01 CET 2004

Am Sat, 06 Nov 2004 06:53:02 -0800 schrieb Gabriele *darkbard* Farina:

> Hi
> I've my application filesystem structured like this:

> I'd like to use a class defined in the module pharaon/utils/
> inside a class defined in pharaon/engine/php/
> I import the class this way (inside
> from pharaon.utils.buffers import FileBuffer
> and then I use the class this way:
> class Tokenizer:
> def __init__(self, source):
> self.buffer = FileBuffer(source)

The indentation got lost.

> In file I got this code:
> from pharaon.engine.php.tokenizer import Tokenizer
> t = Tokenizer("test.php")
> print t.buffer
> but when I run the code it prints None.
> why?? I wrong importing the modules?? 

What does this print?
print t.buffer.__class__


More information about the Python-list mailing list