bram at sara.nl (Bram Stolk) wrote in <3A52EE2C.32432EF5 at sara.nl>: >And because I can do: >dir(__builtins__) > >I thought, why the heck doesn't dir(__main__) work? > Did you try importing the __main__ module before referring to it?: import __main__ dir(__main__)