MyFolder/
function_folder/
__init__.py
function.py
def some_func():
return 'i am func'
creds.py
class creds(elf)
self.user=[]
self.pw=[]
test_folder/
test.py
prod_folder/
live.py
We're trying to organize the folders such that we separate a folder for python functions and testing scriopts and live scripts for automation.
How do you import function.py from live.py?
i've tried the following but none seem to work.
from .function import some_func
from ..function import some_func
from function_folder.function import *
I either get a ValueError:Attempted relative import beyond top-level package or function_folder is not a module
No comments:
Post a Comment