Python Import Statement

jinal jhaveri jhaveri at usc.edu
Sun Jun 29 04:28:51 CEST 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