Drag and drop onto Python script in Windows Explorer

前端 未结 6 988
予麋鹿
予麋鹿 2020-11-29 17:39

I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a co

6条回答
  •  执念已碎
    2020-11-29 18:08

    Try using py2exe. Use py2exe to convert your python script into a windows executable. You should then be able to drag and drop input files to your script in Windows Explorer. You should also be able to create a shortcut on your desktop and drop input files onto it. And if your python script can take a file list you should be able to drag and drop multiple files on your script (or shortcut).

提交回复
热议问题