0

Attached is my project tree and I am trying to use function call draw_Rect on main.py from output.py

project tree:
project tree

In init.py in the video_process folder, I imported as follow

import main
import output
import variables

But when I try to import output from main.py it is grayed out.

How do I import and use the function in output.py?

def draw_rect(video):
    return cv2.putText(video, str("video_in"), (300, 100), cv2.FONT_HERSHEY_COMPLEX, 2, (255, 255, 0), 2)

this is the function.

Narae
  • 59
  • 1
  • 10
  • You don't have an `out.py`. For example, to use a `my_function` from `output.py` either write `from ouput import my_function` and then you can then use `my_function` or write `import output` and then you can use `output.my_function` – bad_coder Feb 10 '21 at 06:24
  • This answer shows what you want https://stackoverflow.com/a/56151144 – bad_coder Feb 10 '21 at 06:26

0 Answers0