File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from typing import Self
22
33from utils .appdata import AppData
4+ from utils .webhost import host
45
56from windows .base import Base
7+ from windows .console import Console
8+
69from webview import (
710 SAVE_DIALOG ,
811 OPEN_DIALOG ,
@@ -85,4 +88,19 @@ def restore_project(
8588 ) -> str | None :
8689 path : str = f"projects/pr_{ self .project_id } /lastload.json"
8790 return self .app_data .fetch_data (path )
91+
92+ def run_project (self : Self , script : str ) -> None :
93+ console_path : str = self .app_data .v_path ("console" )
94+ script_path : str = f"projects/pr_{ self .project_id } /console/entry.gsam"
95+ port , _ = host (console_path )
96+
97+ self .app_data .store_data (
98+ script_path ,
99+ script ,
100+ )
101+
102+ Console (
103+ f"http://localhost:{ port } /" ,
104+ f"{ self .app_data .datapath } /data/{ script_path } " ,
105+ )
88106
You can’t perform that action at this time.
0 commit comments