2024-04-19 02:12:06 发布
网友
我有一些Python脚本,我从命令行或批处理文件中使用,或者通过拖放来做一些有用的事情。在
示例:
makeMyWork.py "hi" 77
现在我赢了10:-(
Windows10不会将参数转发到我的python脚本。我得写:
很多自动装置现在都不起作用了。我开始更改一些重要的批处理文件,但这需要大量的工作。我想找回过去的行为。在
我现在能做什么?在
抱歉,在用Google而不是hulbee搜索后,我找到了答案:
Windows is not passing command line arguments to Python programs executed from the shell
[HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command] @="\"C:\Python25\python.exe\" \"%1\" %*"
感谢mckoss
为了让它对我有用,我将使用注册表路径:
HKEY_CLASSES_ROOT\py_auto_file\shell\open\command
并在参数中添加了一个%*
%*
抱歉,在用Google而不是hulbee搜索后,我找到了答案:
Windows is not passing command line arguments to Python programs executed from the shell
感谢mckoss
为了让它对我有用,我将使用注册表路径:
并在参数中添加了一个
%*
相关问题 更多 >
编程相关推荐