0

Could anyone:

  • write a very short example of a Python package created in PyCharm (under Windows)

  • then import it into a script/module

  • and finally run it from PyCharm Terminal?

Solid T.
  • 11
  • 1
  • 7
  • PLEASE NOTE:  **I've done more than 10 hours of research here, on IntelliJ and on Google** and I can't arrive to this simple sample project. Mine won't work anyway. – Solid T. Mar 11 '21 at 12:14

1 Answers1

0

pycharm imports module from the root folder (e.g. src/module) with folders being seperated by dots import src.module

pycharm will run any code by selecting the file and doing ctrl + shift + f10

modules in python are folders with a __init__.py which imports all methods/classes/variable into them

  • To be more specific, [my issue is closest to this one](https://stackoverflow.com/questions/57760296/can-not-import-package-created-in-pycharm). But it's an abnormal hard-coded workaround for such a basic import task. – Solid T. Mar 11 '21 at 12:24
  • @SolidT. could you please edit you question to have a picture of your file structure – an inconspicuous semicolon Mar 19 '21 at 11:27
  • I am not allowed to post answers for now. I give up on Stack. Thus, I am not enabled to post the answer I have consistently worked on, including the excellent communication with JetBrains Support Team. – Solid T. Apr 07 '21 at 11:40