Importing problems

Gabriele *darkbard* Farina darkbard at
Sat Nov 6 15:53:02 CET 2004


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)

inside the 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?? 


More information about the Python-list mailing list