Hi all,

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?

Thanks in advance

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to