Guest User

Untitled

a guest
Jan 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. print "test"
  2. def print_a():
  3. print "aa"
  4.  
  5. if __name__ == "__main__":
  6. imp = __import__("one")
  7. print dir(imp)
  8.  
  9. import one
  10. import two
  11. import three
  12.  
  13. if __name__ == '__main__':
  14. one.foo()
  15. two.bar()
  16. three.baz()
  17.  
  18. import one
  19. import two
  20. import three
  21.  
  22. result = one.func()
  23. instance = two.YourClass()
  24. something = three.func()
  25.  
  26. #file: thisfile.py
  27. def func():
  28. return 1,2,3
  29.  
  30. if __name__ == "__main__":
  31. if func() != (1,2,3):
  32. print "Error with func"
  33. else:
  34. print "func checks out OK"
  35.  
  36. #anotherfile.py
  37. import thisfile
Add Comment
Please, Sign In to add comment