I'm developing python plugins for CheckMK in Pycharm and I'm using a remote interpreter. Within my code I have import statements which looks like this:
from .agent_based_api.v1 import Service
To make that work in PyCharm I used a bash script to add something to the PYTHONPATH:
#!/bin/bash
# Set system variable to run subscription manager
export PYTHONPATH=/opt/omd/versions/2.0.0p15.cme/lib/python3/cmk/base/plugins/agent_based/
# Run python with arguments
/opt/omd/versions/2.0.0p15.cme/bin/python3 $@
This works somehow, but now I need to write this:
from agent_based_api.v1 import Service
(without the dot) to make PyCharm discover the module correctly.
How can I have that import work with the dot?
Cheers, Roland.