Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- import sys
- actual_args = sys.argv
- sys.argv = [actual_args[1]]
- sys.argv.extend(sys.argv[2:])
- exec(open(actual_args[1]).read())
- except Exception as e:
- import webbrowser
- print(repr(e) + ". Searching StackOverflow for solutions.")
- webbrowser.open("http://stackoverflow.com/search?q=[python] is:answer " + str(e), new = 2)
- exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement