Probably this is the way. Lets professionals say something. I code for fun.
def main(): return 0 # it's not necessary but you can do it if __name__ == '__main__': import sys sys.exit(main())Notice that in Windows the return code for a successful run program is 1. As I remember.