FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

webprompt: fix native test · python-emscripten/python@c3ddd63 · GitHub

Repository navigation

Commit c3ddd63

Browse files
committed
webprompt: fix native test
1 parent 40bf82d commit c3ddd63

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

‎mock/emscripten.pyx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fake python wrapper for emscripten_* C functions for native testing
22

3-
# Copyright (C) 2018 Sylvain Beucler
3+
# Copyright (C) 2018, 2020 Sylvain Beucler
44

55
# Copying and distribution of this file, with or without modification,
66
# are permitted in any medium without royalty provided the copyright
@@ -13,7 +13,7 @@ import sys
1313
sys.platform = 'emscripten'
1414

1515
def set_main_loop(py_function, fps, simulate_infinite_loop):
16-
print "def: set_main_loop", py_function, fps, simulate_infinite_loop
16+
print("def: set_main_loop", py_function, fps, simulate_infinite_loop)
1717
if not simulate_infinite_loop:
1818
# TODO: simulate browser loop in another Python script?
1919
pass
@@ -30,7 +30,7 @@ def async_call(func, arg, millis):
3030
py_function(py_arg)
3131

3232
def exit_with_live_runtime():
33-
print "exit_with_live_runtime"
33+
print("exit_with_live_runtime")
3434

3535
def sleep(ms):
3636
time.sleep(ms/1000.0)
@@ -39,8 +39,8 @@ def sleep_with_yield(ms):
3939
sleep(ms)
4040

4141
def run_script(script):
42-
print "run_script"
43-
print '\n'.join([" "+l for l in script.splitlines()])
42+
print("run_script")
43+
print('\n'.join([" "+l for l in script.splitlines()]))
4444

4545
def syncfs():
46-
print "syncfs"
46+
print("syncfs")

‎mock/emscripten_fetch.pyx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Fake python wrapper for emscripten_fetch* C functions for native testing
2+
3+
# Copyright (C) 2020 Sylvain Beucler
4+
5+
# Copying and distribution of this file, with or without modification,
6+
# are permitted in any medium without royalty provided the copyright
7+
# notice and this notice are preserved. This file is offered as-is,
8+
# without any warranty.
9+

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL