Commits

Michael Hudson-Doyle  committed 47acdea

add __name__=="__main__" to globals

  • Participants
  • Parent commits 18a9b67

Comments (0)

Files changed (1)

File pypy/interpreter/main.py

         ec = executioncontext.ExecutionContext(space)
 
         w_globals = ec.make_standard_w_globals()
+
+        space.setitem(w_globals,
+                      space.wrap("__name__"),
+                      space.wrap("__main__"))
+        
         frame = pyframe.PyFrame(space, code, w_globals, w_globals)
     except baseobjspace.OperationError, operationerr:
         raise PyPyError(operationerr)