Cross Module Command Useage

Keith python at cgcreator.com
Sun Mar 12 08:50:32 EST 2006


Ok so I'm new to the python programming language. and this is my first post
to this mailing list. so here it is.

 

So lets say have two modules.. moduleA and moduleB. they are both imported
into a main python program using the "from module import *" command. now
moduleA has a dynamic command that needs to access a command that is in
moduleB. but when I run these modules from the main python scrip they cant
see each other.. it gives me an error that the command does not exist. Dose
this mean that I need to import moduleB into moduleA for it to see it. or is
there a way that I can tell moduleA too look out to the main python program
for the commands. 

 

I would hate to have to import lets say the "socket" module into every
module rather than just having it look to the main module for the commands.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060312/72cc4fc9/attachment.html>


More information about the Python-list mailing list