Python Import Statement

jinal jhaveri jhaveri at usc.edu
Sat Jun 28 22:28:51 EDT 2003


Hi I have two files
say

a.py

b.py


a.py has 3 classes

A
B
C

Now in b.py I want to instantiate an object of class B

so this is what I do in file b

from xyz.A import B    (xyz is the directory where A is lying and the
paths are set accordingly)

but it gives me an error of the kind, object cannot be called?

Any hints 

thank you
J.







More information about the Python-list mailing list