Skip to content

Commit

Permalink
Added exec example
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Nov 27, 2024
1 parent 47dccee commit 11cdb34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/exec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$globals = new PyDict();
$locals = new PyDict();
PyCore::exec(file_get_contents('./test.py'), $globals, $locals);
1 change: 1 addition & 0 deletions examples/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("hello world")

0 comments on commit 11cdb34

Please sign in to comment.