rejetto forum

thoughts? python joining the html code side

0 Members and 1 Guest are viewing this topic.

Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
my thoughts are interested as I will begin a new test with his js and python:

Basically someone coded a python runtime in Javascript

No installation is required for Brython. Just import the script inside <head> :
<script type=”text/javascript” src=”">
Running Brython
In order for Brython to convert and evaluate the Python code as if it were normal JS, we need to call brython right when the document’s body loads, like so:
<body onload=”brython()”>

Might be a new way to run php
Files I have snagged and share can be found on my google drive:

Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
For running php or sth else, it's maybe a good start to let macro {.exec.} can return stdout outputs :D

Edit: seems this already works:
Code: [Select]
{.exec|php\php.exe -r "$str='Hello, PHP!'; echo $str;"|out=x.}

{.exec|python -c "str='Hello, Python!';print(str)"|out=y.}
So is HFS already able to run php, python, and many more thing? :D (With an error message corrected)
Needs to make {.exec.} more reliable. Such as this.
« Last Edit: July 08, 2020, 06:34:31 AM by NaitLee »
"Computation is not forbidden magic."
Takeback Template | PHFS

Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 841
  • Status: On hiatus (sporadically here)
    • View Profile
bmartino1!! Nice to see you posting! :D (I hope you are well).

Reading about it, you can't run any kind of Python code, it must be "adapted" (slightly modified) to make it work. But it's very interesting. Thanks for sharing it, this seems very cool. 8)

For running php or sth else, it's maybe a good start to let macro {.exec.} can return stdout outputs :D
If I'm not mistaken, raybob used {.exec.} macros in his FHFS. You can find very interesting macros there. ;)
« Last Edit: July 18, 2020, 07:02:10 AM by LeoNeeson »
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.