2021年1月17日星期日

Difference between executing a python script as an executable "./myscript.py" or with "python myscript.py"

As the previous question here: Print a single byte as hex in Python 3, I found the script works well if I execute it as an executable; however, if I ran python <script_name>, it will fail.

What makes the difference between these 2 methods?

https://stackoverflow.com/questions/65769094/difference-between-executing-a-python-script-as-an-executable-myscript-py-or January 18, 2021 at 01:06PM

没有评论:

发表评论