Ahh, you probably made the module "posix" dynamically loadable. This
means that it's no longer in sys.builtin_module_names, which means
that module "os" thinks it can't be imported. (OK, maybe a bit
stupid, but that's the way it is for now.) In the 1.2-beta version of
Modules/Setup, the following fragment exists:
======================================================================
# If you want to build most modules as shared libraries, here are
# a couple of lines to enable. The modules listed here can't be
# built as shared libraries for various reasons.
# IF YOU ENABLE THEM HERE, DISABLE THEM LATER IN THE Setup FILE!
#posix posixmodule.c # posix (UNIX) system calls
#signal signalmodule.c # signal(2)
#gl glmodule.c -lgl -lX11 # Graphics Library -- SGI only
#thread threadmodule.c # threads -- see below
# Uncommenting the following line tells makesetup that all following
# modules are to be built as shared libraries (see above for more detail).
#*noconfig*
======================================================================
Basically, it means that any of the modules posix, signal, gl and
thread, if enabled in Setup, must occur *before* the *noconfig* line.
--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>