Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

testing for __main__

  • Loading branch information...
commit 6154919e982a5e495fd0db7cc00503a23da7aec9 1 parent 4759926
leovt authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 interp.py
5 interp.py
View
@@ -147,8 +147,9 @@ def execute(code, globals):
else:
raise Exception('Unknown Opcode %d (%s)' % (bc, dis.opname[bc]))
-print 'normal Python call:', test()
-print 'own execute function:', execute(test.func_code, test.func_globals)
+if __name__ == '__main__':
+ print 'normal Python call:', test()
+ print 'own execute function:', execute(test.func_code, test.func_globals)
Please sign in to comment.
Something went wrong with that request. Please try again.