Re: 2 class with same name in different module
> thats a syntax error; I assume you meant message = message.replace( "a syntax error", "almost always an import error (no module named py)" ) -- http://mail.python.org/mailman/listinfo/python-list
Re: 2 class with same name in different module
"Iyer, Prasad C" wrote: > I have a class in a module which is getting imported in main module. > How do you differentiate between the 2 class if you have one class in a module, why do you need to differentiate between it? assuming that you do in fact have *two* classes with the same name in two different modules, you just have to import them as usual, and access them via their modules: import module1 import module2 o1 = module1.Class() o2 = module2.Class() if this is not what you mean, please post a short example that shows what the problem really is. -- http://mail.python.org/mailman/listinfo/python-list
Re: 2 class with same name in different module
Iyer, Prasad C wrote: > I have a class in a module which is getting imported in main module. > How do you differentiate between the 2 class import foo import bar foo.TheClass().dostuff() bar.TheClass().dostuff() -- http://mail.python.org/mailman/listinfo/python-list
2 class with same name in different module
I have a class in a module which is getting imported in main module. How do you differentiate between the 2 class regards prasad chandrasekaran This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. -- http://mail.python.org/mailman/listinfo/python-list