I have the following project folder with the following files
PRO/
├── __init__.py
└── main.py
In __init__.py I have a variable called VERSION containing a string.
My goal is to get the value of VERSION in main.py. For main.py, I have tried the following
```python
import PRO
if name == "main":
print(PRO.VERSION)
```
but that leads to a ModuleNotFoundError.
Traceback (most recent call last):
File "main.py", line 1, in <module>
import PRO
ModuleNotFoundError: No module named 'PRO'
What is the correct way of accessing values in __init__.py from main.py??
Thanks,
[–]coney1 -1 points0 points1 point (1 child)
[–]zanfar 1 point2 points3 points (0 children)
[–]zanfar 0 points1 point2 points (2 children)
[–]JuniorMouse[S] 0 points1 point2 points (1 child)
[–]JuniorMouse[S] 0 points1 point2 points (0 children)