Skip to main content

Import custom functions

Hi everyone,
I have written several .py files and tried to import them to my main file. The program works on terminal; however when I try to run it on IDEA it doesn't work. It halts at "Python script is running" and nothing happens. I put all the files in Macros.ILB, but sstill don't work. Should I put them on a different directory?
Thanks in advance.

Brian Element Mon, 02/08/2021 - 07:41

They generally need to be in the same directory as the calling python script so that the script will be able to find them.  

Duygu Mon, 02/08/2021 - 12:59

I put them in the same Macros.ILB directory, but main python script couldn't import the other .py files. I also addded absolute path for imports. Should I do something different?