-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython3.html
More file actions
121 lines (116 loc) · 5.8 KB
/
Copy pathpython3.html
File metadata and controls
121 lines (116 loc) · 5.8 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<link rel="icon" href="data:,">
<link rel="stylesheet" href="python3.css">
<title>Tidyparse Python 3 + ty Playground</title>
</head>
<body>
<div id="python-app">
<header class="toolbar">
<div class="brand">
<span class="brand-mark" aria-hidden="true">Py</span>
<span class="brand-copy">
<strong>Python 3 Playground</strong>
<small>Monaco + ty + TidyParse</small>
</span>
<span id="ty-mode" class="mode-badge">type analysis</span>
</div>
<div class="toolbar-actions">
<button id="reset-source" type="button">Reset</button>
<button id="toggle-theme" class="icon-button" type="button" title="Use dark theme"
aria-label="Use dark theme" aria-pressed="false">◐</button>
<a class="source-link" href="https://github.com/astral-sh/ty" target="_blank" rel="noreferrer">ty ↗</a>
<button id="run-source" class="run-button" type="button" title="Run in the browser (Ctrl/⌘+Enter)">
<span class="run-icon" aria-hidden="true">▶</span>
<span class="run-label">Run</span>
</button>
</div>
</header>
<main class="workspace">
<section class="editor-pane" aria-label="Python source editor">
<div class="pane-header">
<span>main.py</span>
<span>Ctrl+Space repairs syntax · F12 for definition · Shift+Alt+F to format · Ctrl/⌘+Enter to run</span>
</div>
<div id="python-editor" aria-label="Python source code"></div>
</section>
<aside class="inspector" aria-label="ty analysis and Python execution">
<section aria-label="ty diagnostics">
<div class="section-heading">
<h2>Analysis</h2>
<span id="diagnostic-count" class="count">0</span>
</div>
<div id="diagnostics" class="diagnostics" aria-live="polite">
<p class="empty-state">ty is starting…</p>
</div>
</section>
<section class="execution-card" aria-label="Local Python program execution">
<div class="section-heading">
<h2>Execution</h2>
<span id="execution-status" class="execution-status" data-state="idle"
role="status" aria-live="polite">Not run</span>
</div>
<div id="execution-tabs" class="execution-tabs" role="tablist" aria-label="Execution details">
<button id="execution-tab-button-input" type="button" role="tab" data-tab="input"
aria-controls="execution-tab-input" aria-selected="true" tabindex="0">Input</button>
<button id="execution-tab-button-output" type="button" role="tab" data-tab="output"
aria-controls="execution-tab-output" aria-selected="false" tabindex="-1">Output</button>
<button id="execution-tab-button-diagnostics" type="button" role="tab" data-tab="diagnostics"
aria-controls="execution-tab-diagnostics" aria-selected="false" tabindex="-1">Diagnostics</button>
</div>
<div class="execution-content">
<section id="execution-tab-input" class="execution-tab" role="tabpanel"
aria-labelledby="execution-tab-button-input">
<label for="program-input">Standard input</label>
<textarea id="program-input" placeholder="Optional stdin…" spellcheck="false"></textarea>
</section>
<section id="execution-tab-output" class="execution-tab is-hidden" role="tabpanel"
aria-labelledby="execution-tab-button-output">
<div id="execution-output-meta" class="result-meta">Run the program to see its output.</div>
<pre id="execution-output" tabindex="0" aria-label="Program output" aria-live="polite">No output yet.</pre>
</section>
<section id="execution-tab-diagnostics" class="execution-tab is-hidden" role="tabpanel"
aria-labelledby="execution-tab-button-diagnostics">
<div id="execution-diagnostics-meta" class="result-meta">Tracebacks and stderr will appear here.</div>
<pre id="execution-diagnostics" tabindex="0" aria-label="Runtime diagnostics"
aria-live="polite">No diagnostics yet.</pre>
</section>
</div>
<p class="execution-credit">
Python runs locally in this browser with
<a href="https://pyodide.org/" target="_blank" rel="noreferrer">Pyodide 0.27.5</a>.
</p>
</section>
<section class="engine-card">
<h2>Browser engine</h2>
<dl>
<div><dt>Backend</dt><dd id="engine-name">ty</dd></div>
<div><dt>Revision</dt><dd id="engine-revision">loading…</dd></div>
<div><dt>Analysis host</dt><dd>Browser · Wasm</dd></div>
</dl>
<div id="engine-capabilities" class="capabilities"></div>
</section>
</aside>
</main>
<footer class="statusbar">
<span id="cursor-position">Ln 1, Col 1</span>
<span class="status-spacer"></span>
<span id="analysis-summary">Waiting for analysis</span>
<span id="repair-status" class="runtime-status" data-state="loading" role="status" aria-live="polite">
<span class="status-dot" aria-hidden="true"></span>
<span class="status-text">Loading syntax repair…</span>
</span>
<span id="ty-status" class="runtime-status" data-state="loading" role="status" aria-live="polite">
<span class="status-dot" aria-hidden="true"></span>
<span class="status-text">Loading ty…</span>
</span>
</footer>
</div>
<script src="ty-wasm-loader.js"></script>
<script src="tidyparse-python.js"></script>
</body>
</html>