in src/hpc/autoscale/clilib.py [0:0]
def shell(self, config: Dict, script: Optional[str] = None, rest: Optional[List[str]] = None) -> None:
"""
Interactive python shell with relevant objects in local scope.
Use --script to run python scripts
"""
shell_locals = self._setup_shell_locals(config)
if rest:
shell_locals["shell_args"] = rest
for t in [Job, ht.Memory, ht.Size, Node, SchedulerNode, NodeBucket]:
simple_name = t.__name__.split(".")[-1]
if simple_name not in shell_locals:
shell_locals[simple_name] = t
if script and not os.path.exists(script):
error("Script does not exist: %s", script)
shell(config, shell_locals, script)