Skip to content

Commit 175f8ce

Browse files
committed
Remove unicode for windows
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent dcb31f3 commit 175f8ce

10 files changed

Lines changed: 20 additions & 20 deletions

src/sdk/python/core/examples/benchmark.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,21 @@ def main():
202202
r = run_suite("Wasm + Python", backend="wasm", module="python_guest.path", lang="python")
203203
all_results["Wasm + Python"] = r
204204
except Exception as e:
205-
print(f" ⚠️ Skipped: {e}")
205+
print(f" [warn] Skipped: {e}")
206206

207207
# JavaScript in Wasm
208208
try:
209209
r = run_suite("Wasm + JavaScript", backend="wasm", module="javascript_guest.path", lang="javascript")
210210
all_results["Wasm + JavaScript"] = r
211211
except Exception as e:
212-
print(f" ⚠️ Skipped: {e}")
212+
print(f" [warn] Skipped: {e}")
213213

214214
# HyperlightJS
215215
try:
216216
r = run_suite("HyperlightJS", backend="hyperlight-js", lang="javascript")
217217
all_results["HyperlightJS"] = r
218218
except Exception as e:
219-
print(f" ⚠️ Skipped: {e}")
219+
print(f" [warn] Skipped: {e}")
220220

221221
# ── Summary table (averages) ─────────────────────────────────
222222
if all_results:

src/sdk/python/core/examples/javascript_basics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def timed_run(sandbox, code, label="run"):
1616
start = time.perf_counter()
1717
result = sandbox.run(code)
1818
elapsed_ms = (time.perf_counter() - start) * 1000
19-
print(f"⏱️ {label}: {elapsed_ms:.1f}ms")
19+
print(f"[timer] {label}: {elapsed_ms:.1f}ms")
2020
return result
2121

2222

@@ -28,7 +28,7 @@ def timed_run(sandbox, code, label="run"):
2828
"This example requires the HyperlightJS backend. "
2929
"Install hyperlight-sandbox[hyperlight_js] or run `just python-build`."
3030
) from exc
31-
print(f"⏱️ Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
31+
print(f"[timer] Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
3232

3333
sandbox.register_tool("add", lambda a=0, b=0: a + b)
3434
sandbox.register_tool("multiply", lambda a=0, b=0: a * b)
@@ -128,4 +128,4 @@ def timed_run(sandbox, code, label="run"):
128128
assert "26" in lines[1], f"Expected 26, got: {lines[1]}"
129129
assert "gpt-4" in lines[2], f"Expected gpt-4, got: {lines[2]}"
130130

131-
print("\n JavaScript basics example passed!")
131+
print("\n[ok] JavaScript basics example passed!")

src/sdk/python/core/examples/javascript_filesystem_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ def separator(label: str) -> None:
117117
assert f.read() == "do not modify"
118118
print("OK: guest cannot write to input")
119119

120-
print("\n All JS filesystem tests passed!")
120+
print("\n[ok] All JS filesystem tests passed!")

src/sdk/python/core/examples/javascript_network_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@
7878
assert "POST blocked" in result.stdout, "test 3: expected POST to be blocked"
7979

8080
print("═" * 60)
81-
print(" All tests passed!")
81+
print("[ok] All tests passed!")
8282
print("═" * 60)

src/sdk/python/core/examples/jswasm_basics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def timed_run(sandbox, code, label="run"):
1616
start = time.perf_counter()
1717
result = sandbox.run(code)
1818
elapsed_ms = (time.perf_counter() - start) * 1000
19-
print(f"⏱️ {label}: {elapsed_ms:.1f}ms")
19+
print(f"[timer] {label}: {elapsed_ms:.1f}ms")
2020
return result
2121

2222

@@ -28,7 +28,7 @@ def timed_run(sandbox, code, label="run"):
2828
"This example requires the Wasm backend and packaged JavaScript guest package. "
2929
"Install hyperlight-sandbox[wasm,javascript_guest] or run `just python-build`."
3030
) from exc
31-
print(f"⏱️ Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
31+
print(f"[timer] Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
3232

3333
sandbox.register_tool("add", lambda a=0, b=0: a + b)
3434
sandbox.register_tool("multiply", lambda a=0, b=0: a * b)
@@ -137,4 +137,4 @@ def timed_run(sandbox, code, label="run"):
137137
assert "26" in lines[1], f"Expected 26, got: {lines[1]}"
138138
assert "gpt-4" in lines[2], f"Expected gpt-4, got: {lines[2]}"
139139

140-
print("\n All tests passed!")
140+
print("\n[ok] All tests passed!")

src/sdk/python/core/examples/jswasm_filesystem_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ def separator(label: str) -> None:
117117
assert f.read() == "do not modify"
118118
print("OK: guest cannot write to input")
119119

120-
print("\n All JS Wasm filesystem tests passed!")
120+
print("\n[ok] All JS Wasm filesystem tests passed!")

src/sdk/python/core/examples/jswasm_network_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@
7373
assert "POST blocked" in result.stdout, "test 3: expected POST to be blocked"
7474

7575
print("═" * 60)
76-
print(" All tests passed!")
76+
print("[ok] All tests passed!")
7777
print("═" * 60)

src/sdk/python/core/examples/python_basics.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def timed_run(sandbox, code, label="run"):
1818
start = time.perf_counter()
1919
result = sandbox.run(code)
2020
elapsed_ms = (time.perf_counter() - start) * 1000
21-
print(f"⏱️ {label}: {elapsed_ms:.1f}ms")
21+
print(f"[timer] {label}: {elapsed_ms:.1f}ms")
2222
return result
2323

2424

@@ -31,7 +31,7 @@ def timed_run(sandbox, code, label="run"):
3131
"This example requires the Wasm backend and packaged Python guest package. "
3232
"Install hyperlight-sandbox[wasm,python_guest] or run `just python-build`."
3333
) from exc
34-
print(f"⏱️ Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
34+
print(f"[timer] Sandbox created (lazy): {(time.perf_counter() - t0) * 1000:.1f}ms")
3535

3636
# Register host tools before first run()
3737
sandbox.register_tool("add", lambda a=0, b=0: a + b)
@@ -89,14 +89,14 @@ async def async_multiply(a: float, b: float):
8989
print("\n--- Test 4: Snapshot/restore ---")
9090
t0 = time.perf_counter()
9191
snap = sandbox.snapshot()
92-
print(f"⏱️ snapshot: {(time.perf_counter() - t0) * 1000:.1f}ms")
92+
print(f"[timer] snapshot: {(time.perf_counter() - t0) * 1000:.1f}ms")
9393

9494
result1 = timed_run(sandbox, 'x = 42; print(f"x = {x}")', "pre-restore run")
9595
print(f"Before restore: {result1.stdout!r}")
9696

9797
t0 = time.perf_counter()
9898
sandbox.restore(snap)
99-
print(f"⏱️ restore: {(time.perf_counter() - t0) * 1000:.1f}ms")
99+
print(f"[timer] restore: {(time.perf_counter() - t0) * 1000:.1f}ms")
100100

101101
result2 = timed_run(
102102
sandbox,
@@ -156,4 +156,4 @@ async def async_multiply(a: float, b: float):
156156
assert "26" in lines[1], f"Expected 26, got: {lines[1]}"
157157
assert "gpt-4" in lines[2], f"Expected gpt-4 in greeting, got: {lines[2]}"
158158

159-
print("\n All tests passed!")
159+
print("\n[ok] All tests passed!")

src/sdk/python/core/examples/python_filesystem_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ def separator(label: str) -> None:
142142
assert f.read() == "do not modify"
143143
print("OK: guest cannot write to input")
144144

145-
print("\n All filesystem tests passed!")
145+
print("\n[ok] All filesystem tests passed!")

src/sdk/python/core/examples/python_network_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@
7070
assert "POST blocked" in result.stdout, "test 3: expected POST to be blocked"
7171

7272
print("═" * 60)
73-
print(" All tests passed!")
73+
print("[ok] All tests passed!")
7474
print("═" * 60)

0 commit comments

Comments
 (0)