Currently, simopt get the name of the program by importing __main__ and doing gymnastic on it. It could get the name of the program by requiring sys.argv as an argument rather than a truncated version of it. Indeed, the first element of argv is the path used to call the program; and the args argument is usually sys.argv[1:].
Currently, simopt get the name of the program by importing
__main__and doing gymnastic on it. It could get the name of the program by requiringsys.argvas an argument rather than a truncated version of it. Indeed, the first element of argv is the path used to call the program; and theargsargument is usuallysys.argv[1:].