1

I am trying to use a Pweave tool with Pycharm Professional 2018.2

Inspired by this blog-post, I tried to create and publish Python scripts, but I don't understand how to make Pycharm "play" with External Tools and how to trigger and run with pypublish.

I installed the library with conda and I can see the pweave package in the packages list in "Project Interpreter" section.

Tim Mironov
  • 849
  • 8
  • 22
  • I think if you've setup Pycharm like they said in the blog post you will notice that it recognizes the example code. Did you try running the example code? – NoSplitSherlock Mar 17 '19 at 14:27
  • @NoSplitSherlock I don't understand what was the setup in the article, I didn't see any mentions of special setup. What do you mean "recognize"? Given the example file, how would one run it from PyCharm? Using the console? – Tim Mironov Mar 17 '19 at 15:24
  • You have to configure it as an external tool and run it like one. Try to follow the example in the blog just to understand how it all works. I can't explain more because the blog already tells you everything you need to know. – NoSplitSherlock Mar 17 '19 at 15:38
  • I appreciate you trying to help me, really, but if the blog had all the details, I wouldn't ask the question here. There is only one screenshot with setting the External Tool, which is not very clear and has no explanation at all. The article then has no additional details on how to run the tool and how to automate it in PyCharm... – Tim Mironov Mar 17 '19 at 16:04

1 Answers1

3

After a lot of trial and error and some reading about other external tools, I managed to set the Pweave to work with Pycharm Professional 2018.2 on Windows in the following way:

First, install the Pweave library, using conda or pip (I used conda on virtual environment):

conda install pweave -c conda-forge

Then, inside PyCharm: File -> Settings -> Tools -> External Tools add new tool, I used the following configuration:

enter image description here

In the "Program" section I provided the relative path to the Pweave executable and in the "Arguments" section the full file path, using available macros $PyInterpreterDirectory$ and $FilePath$

In order to run the tool: right click on the desired script and select Pweave from "External Tools"

Tim Mironov
  • 849
  • 8
  • 22