Make code at outer level executable as __main__ only, as it should, so that pydoc runs normally