Goodness, you're a nice friendly lot aren't you!? I saw that and I
realise that ActivePython COMES with support for Windows. But it
doesn't say that it forces scripts you create with it to load modules
you haven't implicitly imported yourself! It doesn't say that a
script might run in PythonWin but not in the command line python.
The key is that PythonWin is NOT loading the modules "for your
script"... It loaded those modules for ITSELF -- the whole GUI of
PythonWin is based on the Win32api; when you ran your script from within
PythonWin, you had ITS environment as part of your global namespace.
That's what I meant by "reverse"; without the Win32api modules,
there is NO PythonWin IDE...
Didn't you wonder about how PythonWin was able to do the pop-up
assistance when you typed something like "win32api."? If you've never
executed an import for a module, and PythonWin gives that help, then
PythonWin had already, at some level, loaded the module for its own use.
Where it is in the namespace I don't really know -- only that some are
in use by PythonWin from the start.
Oh, and even if you do perform an import in the interactive window,
that action, too, makes the module available to all scripts being
edited/run within that session.
--