如何使用外部可执行文件将 eclipse(pydev) 配置为 运行
how to configure eclipse(pydev) to run with external executable
我有一个测试框架,我的所有测试都必须使用特定的可执行文件(比如 M)启动。我所有的测试都写在 python(我用 pydev 配置了 eclipse)。目前我 运行 我的测试是 运行 通过 cmdline 的,例如:
$ M -test <test_file_name>.<testcase_name>
如何配置 eclipse 运行 配置,以便我实际上可以从 eclipse 执行 运行 /debug?我找不到任何文档告诉我是否可以使用 run/debug 配置中的 "Program Arguments" 来设置它?
你必须配置 PyDev 并给他一个 executable/interpreter
的路径
来自这个site :
Go to: window > preferences > PyDev > Interpreter - (Python/Jython/IronPython).
Choose the interpreter you have installed in your computer (such as python.exe, jython.jar or ipy.exe).
Other source for possible problems/solutions
PyDev 始终会 运行 使用您在解释器首选项中配置的 python 可执行文件(因此,如果您想 运行 使用不同的可执行文件,它只会在以下情况下起作用它是一个在解释器首选项中配置的程序,可以启动任何 python 脚本——就像常规解释器一样)。
如果不是您的情况,您可以配置一个外部工具来制作 运行(运行 > 外部工具 > 外部工具配置 > 程序),然后使用它来 运行.
现在,如果您的可执行文件确实像 python 可执行文件一样工作(或者如果您本身就是 运行 Python),请参阅:
开始如何 运行 一个程序:http://pydev.org/manual_101_run.html
我有一个测试框架,我的所有测试都必须使用特定的可执行文件(比如 M)启动。我所有的测试都写在 python(我用 pydev 配置了 eclipse)。目前我 运行 我的测试是 运行 通过 cmdline 的,例如:
$ M -test <test_file_name>.<testcase_name>
如何配置 eclipse 运行 配置,以便我实际上可以从 eclipse 执行 运行 /debug?我找不到任何文档告诉我是否可以使用 run/debug 配置中的 "Program Arguments" 来设置它?
你必须配置 PyDev 并给他一个 executable/interpreter
的路径来自这个site :
Go to: window > preferences > PyDev > Interpreter - (Python/Jython/IronPython).
Choose the interpreter you have installed in your computer (such as python.exe, jython.jar or ipy.exe).
Other source for possible problems/solutions
PyDev 始终会 运行 使用您在解释器首选项中配置的 python 可执行文件(因此,如果您想 运行 使用不同的可执行文件,它只会在以下情况下起作用它是一个在解释器首选项中配置的程序,可以启动任何 python 脚本——就像常规解释器一样)。
如果不是您的情况,您可以配置一个外部工具来制作 运行(运行 > 外部工具 > 外部工具配置 > 程序),然后使用它来 运行.
现在,如果您的可执行文件确实像 python 可执行文件一样工作(或者如果您本身就是 运行 Python),请参阅:
开始如何 运行 一个程序:http://pydev.org/manual_101_run.html