mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-11 14:10:19 +00:00
Compare commits
3 Commits
68273017b8
...
b82b3702e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b82b3702e2 | ||
|
|
34e9595ec6 | ||
|
|
05764225d7 |
@ -30,6 +30,7 @@ Developers are able to write Python bindings via C-API or pybind11 compatible in
|
|||||||
|
|
||||||
Please see https://pocketpy.dev for details and try the following resources.
|
Please see https://pocketpy.dev for details and try the following resources.
|
||||||
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
|
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
|
||||||
|
+ [Live C Examples](https://pocketpy.github.io/examples/): Explore C-APIs in your browser
|
||||||
|
|
||||||
## Supported Platforms
|
## Supported Platforms
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ write_file('amalgamated/pocketpy.h', merge_h_files())
|
|||||||
shutil.copy("src2/main.c", "amalgamated/main.c")
|
shutil.copy("src2/main.c", "amalgamated/main.c")
|
||||||
|
|
||||||
if sys.platform in ['linux', 'darwin']:
|
if sys.platform in ['linux', 'darwin']:
|
||||||
ok = os.system("clang -o main amalgamated/pocketpy.c amalgamated/main.c -O1 --std=c11 -lm -ldl")
|
ok = os.system("gcc -o main amalgamated/pocketpy.c amalgamated/main.c -O1 --std=c11 -lm -ldl")
|
||||||
if ok == 0:
|
if ok == 0:
|
||||||
print("Test build success!")
|
print("Test build success!")
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,9 @@ It aims to be an alternative to Lua for game scripting, with elegant syntax, pow
|
|||||||
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project.
|
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project.
|
||||||
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.
|
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.
|
||||||
|
|
||||||
|
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
|
||||||
|
+ [Live C Examples](https://pocketpy.github.io/examples/): Explore C-APIs in your browser
|
||||||
|
|
||||||
## What it looks like
|
## What it looks like
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
@ -16,14 +16,14 @@ links:
|
|||||||
icon: play
|
icon: play
|
||||||
link: "https://pocketpy.dev/static/web/"
|
link: "https://pocketpy.dev/static/web/"
|
||||||
target: blank
|
target: blank
|
||||||
|
- text: "Live Examples"
|
||||||
|
icon: code
|
||||||
|
link: "https://pocketpy.github.io/examples/"
|
||||||
|
target: blank
|
||||||
- text: "Github"
|
- text: "Github"
|
||||||
icon: mark-github
|
icon: mark-github
|
||||||
link: https://github.com/blueloveth/pocketpy
|
link: https://github.com/blueloveth/pocketpy
|
||||||
target: blank
|
target: blank
|
||||||
- text: Issues
|
|
||||||
link: https://github.com/blueloveth/pocketpy/issues
|
|
||||||
icon: issue-opened
|
|
||||||
target: blank
|
|
||||||
- text: Discord
|
- text: Discord
|
||||||
link: https://discord.gg/WWaq72GzXv
|
link: https://discord.gg/WWaq72GzXv
|
||||||
icon: comment-discussion
|
icon: comment-discussion
|
||||||
|
|||||||
@ -658,7 +658,10 @@ static bool
|
|||||||
py_dict_setitem_by_str(locals, "_", val);
|
py_dict_setitem_by_str(locals, "_", val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pk_exec(co, module);
|
ok = pk_execdyn(co, module, py_peek(-3), locals);
|
||||||
|
if(!ok) return false;
|
||||||
|
py_shrink(3);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool py_smartexec(const char* source, py_Ref module, ...) {
|
bool py_smartexec(const char* source, py_Ref module, ...) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user