Skip to main content

Suggestions for developing your script

When using PyCharm, you should run it "as administrator". This tends to be a popular requirement for developer tools. The PyCharm version does not matter.

Some useful settings to configure in PyCharm:

  1. Go to File > Settings > Project: company > Project Structure.

    To make it resolve the Python content correctly, there is a set of four folders to index:

    • <instance>/component/ - Right-click on the Custom folder and select Sources.

    • Default - Right-click on the Default folder and select Sources.

    • <instance>/ - Right-click on the idmlib folder and select Sources.

    • <instance>/idmlib/ - Right-click on the extras folder and select Sources.

    These four folders are often needed. Once you click Ok, there won’t be any visible impact.

  2. Turn off the option in PyCharm to collapse imports because, as part of the Bravura Security code review, there is a specific way that we like to see the imports:

    1. Go to File > Settings > Editor > General > Code Folding.

    2. Remove the checkmark for Imports and click Ok.

  3. Turn off flagging of spelling errors. This prevents every keyword and words in other languages being flagged all the time.

    1. Go to File > Settings > Editor > Inspections.

    2. Remove the checkmark for "Spelling" (This will also remove it for "Typo") and click Ok.

  4. Tell PyCharm the location of the interpreter:

    1. Go to File > Settings > Project: company > Project interpreter.

    2. Select the drop-down for project interpreter.

      This should come up with a selection for where the interpreter is; if it doesn’t then look for where the python.exe file is.

Telling PyCharm where the interpreter exists helps PyCharm provide error messages about the code since different versions of Python support different features and functionality.