Drag and drop onto Python script in Windows Explorer

前端 未结 6 994
予麋鹿
予麋鹿 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 17:54

    1). create shortcut of .py
    2). right click -> properties
    3). prefix "Target:" with "python" so it runs the .py as an argument into the python command
    or
    1). create a .bat
    2). python some.py %*

    these shortcut versions are simplest for me to do what i'm doing
    otherwise i'd convert it to a .exe, but would rather just use java or c/c++

提交回复
热议问题