Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
29 lines (23 loc) · 728 Bytes

File metadata and controls

executable file
·
29 lines (23 loc) · 728 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# plan executor
import sys
import plan_words_parsing
import plan_words_evaluation
# execute the plan
def execute_plan(plan_to_execute):
plan_words = plan_words_parsing.words_parse(plan_to_execute)
plan_words_evaluation.evaluate_plan(plan_words)
# entry point
if __name__ == "__main__":
# check for command line arguments
if len(sys.argv) > 1:
plan_file = sys.argv[1]
else:
plan_file = "example_plans/testing.plan"
# execute the plan
try:
with open(plan_file, 'r') as f:
execute_plan(f.read())
except FileNotFoundError:
print(f"Error: Plan file '{plan_file}' not found.")
except Exception as e:
print(f"Error executing plan: {e}")
Morty Proxy This is a proxified and sanitized view of the page, visit original site.