Advertisement
Guest User

SOEH-py

a guest
Mar 21st, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. try:
  2.     import sys
  3.     actual_args = sys.argv
  4.     sys.argv = [actual_args[1]]
  5.     sys.argv.extend(sys.argv[2:])
  6.     exec(open(actual_args[1]).read())
  7. except Exception as e:
  8.     import webbrowser
  9.     print(repr(e) + ". Searching StackOverflow for solutions.")
  10.     webbrowser.open("http://stackoverflow.com/search?q=[python] is:answer " + str(e), new = 2)
  11.     exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement