Update scripts/my_script.py
This commit is contained in:
parent
623afad1b4
commit
277dc97977
|
|
@ -5,6 +5,18 @@ from pathlib import Path
|
||||||
# Ensure the script can locate utils.py
|
# Ensure the script can locate utils.py
|
||||||
sys.path.append(str(Path(__file__).parent))
|
sys.path.append(str(Path(__file__).parent))
|
||||||
|
|
||||||
|
|
||||||
|
# Get the role directory dynamically
|
||||||
|
role_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
print(role_path)
|
||||||
|
|
||||||
|
with os.scandir(role_path) as entries:
|
||||||
|
files = [entry.name for entry in entries if entry.is_file()]
|
||||||
|
print(files)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Import custom functions
|
# Import custom functions
|
||||||
from utils import *
|
from utils import *
|
||||||
from config import *
|
from config import *
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue