import error?
Tom
llafba_NOSPAM_ at gmx.net
Thu Oct 16 10:58:33 EDT 2003
Hi Peter,
thanks for trying to help me. I can see that it can be confusing to read
my posts, but it is so hard to explain a problem if you do not even know
the source of the problem?! :-( But I appreciate your patience.
I didn't use the interactive interpreter. I don't now why it says
<string> and "?". I just use the window (python shell) for output. My
code is strctured like this: My main program does not have any classes
or functions. It is supposed to run all the way through and calls
different modules for the different tasks. I did that because I didn't
want to overload the main program. After every step (which usually means
after calling a module) I have an output in the shell window. When I
said that I include stuff at the beginning I meant at the total
beginning of my main programm and at the total beginning of each module
that I use (before defining the class and function). Of course I only
include what I also need. I use this one module that later causes my
problems in the main program for the first time. It works fine there.
Than I can start my business which means that I call all the different
modules depending on the action that is neccessary. Sometimes it is
necessary to use this specific module (that I already used before) in
one of the other modules that I just called from my main program. Is
that maybe a problem, that I can't include the module in the main
program and in a module called by the main program? I import everything
that is neccessary it in both!
I also tried this: I made an exact copy of my module and just renamed
it. Using the original module in the main program and the renamed module
in the other module that I call from my main program. That worked fine.
Maybe because they were different modules and python doesn't like it if
I call the same module? But what still irritates me is the fact that
everything also works fine if I write the "from bla import *" line
directly before I refere to the function in that module. I don't like
this but I meantion it, because I think it is strange that it works then.
Well, I could use this copied and renamed module, but because it
consists exactly the same code and just changed the filename (all the
class and function names are still the same), I don't really see the
necessity. Maybe it is one of the Thursday only problems! :-) But I
would love to find the find out what's wrong :-)
I don't know if this helps or just confuses more. :-) I hope not. :-)
Thank you very much for all your help anyway.
Regards, Tom
More information about the Python-list
mailing list