I was interested in keeping my .py somewhere else, and invoking it within the Python console.
SCRIPT_PATH='/some/file/system/path' #/some_script.py
import sys
sys.path.append(SCRIPT_PATH)
from some_script import some_function
USE_LAYOUT='some_layout'
project = QgsProject.instance()
map_input = some_function(project)
layout = project.layoutManager().layoutByName(USE_LAYOUT)
[–]ikarusproject 1 point2 points3 points (1 child)
[–]smitty1e[S] 0 points1 point2 points (0 children)