Advertisement
furas

Python - __name__

Sep 7th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def main():
  2.     print("test2.py, main(), __name__:", __name__)
  3.  
  4. # ---------------------------------
  5.  
  6. if __name__ == "__main__":  
  7.     print("run directly")
  8.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement