placid wrote: > I have the following class code for a Node for a Linked List, (saved in > node.py) > > class Node : > def __init__(self,element): > self.element = element > self.next = None > > then i have another module called LinkedList.py, with following code > > import sys > import node > def main(): > print "Does nothin ATM, as it doesnt work" > main() > > the problem im having is that im getting NameError exception when i run > LinkedList.py "global name 'Node' is not defined" > > Does anyone know what the problem is here?
I have trouble believing you. I suspect you are telling us what you think is happening, and leaving something vital out. In particular, cut and paste the traceback. Here's another experiment, interactively do: import node print node.__file__ Perhaps that will tell you something. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list