在 Pycharm 中使用 Pweave 工具

Using Pweave tool from within Pycharm

我正在尝试将 Pweave tool 与 Pycharm Professional 2018.2

一起使用

受此 blog-post 的启发,我尝试创建和发布 Python 脚本,但我不明白如何使用外部工具制作 Pycharm "play" 和如何用 pypublish.

触发和 运行

我用 conda 安装了这个库,我可以在 "Project Interpreter" 部分的包列表中看到 pweave 包。

经过大量试验和错误以及对其他外部工具的一些阅读后,我设法通过以下方式将 Pweave 设置为在 Windows 上与 Pycharm Professional 2018.2 一起使用:

首先,使用conda或pip安装Pweave库(我在虚拟环境中使用conda):

conda install pweave -c conda-forge

然后,在PyCharm里面:File -> Settings -> Tools -> External Tools添加新工具,我使用了以下配置:

在 "Program" 部分我提供了 Pweave 可执行文件的相对路径,在 "Arguments" 部分提供了完整的文件路径,使用可用的宏 $PyInterpreterDirectory$$FilePath$

为了运行工具: 右击想要的脚本然后select Pweave from "External Tools"