Windows: run python command from clickable icon

前端 未结 4 755
北荒
北荒 2020-12-20 19:25

I have a python script I run using Cygwin and I\'d like to create a clickable icon on the windows desktop that could run this script without opening Cygwin and entering in t

4条回答
  •  不思量自难忘°
    2020-12-20 19:37

    The simplest solution will be creating batch file containing command like:

    c:\python27\python.exe c:\somescript.py
    

    With this solution you will have to have installed python interpreter. If you need more portable solution you can try for e.g. py2exe and bundle python scripts into executable file, able to run without requiring a Python installation.

提交回复
热议问题