daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Other code goes here
  2. def run():
  3.     pass
  4.     # ...
  5.  
  6. def main():
  7.     global nailgun
  8.  
  9.     while True:
  10.         try:
  11.             nailgun = importlib.reload(nailgun)
  12.         except ImportError as e:
  13.             print("ImportError: {}".format(e))
  14.             print("Hit enter to reload")
  15.             input()
  16.             continue
  17.  
  18.         try:
  19.             nailgun.run()
  20.         except Exception as e:
  21.             print(repr(e))
  22.             print("Caught exception in run: {}".format(e))
  23.         print("Hit enter to reload/rerun")
  24.         input()
  25.  
  26.  
  27. if __name__ == "__main__":
  28.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top