diff --git a/pyscriptjs/examples/index.html b/pyscriptjs/examples/index.html index a155030e282..986da26f352 100644 --- a/pyscriptjs/examples/index.html +++ b/pyscriptjs/examples/index.html @@ -7,26 +7,49 @@ PyScript demo - - - + - +

PyScript demos


-

Simple script

-

A static demo of the <py-script> tag

+

Bokeh Interactive

+

Interactive demo using a Bokeh slider widget to dynamically change a value in the page -

Simple script 2

-

A dynamic demo of the <py-script> tag

+ WARNING: This examples takes a little longer to load. So be patient :) +

-

REPL

-

A Python REPL (Read Eval Print Loop).

+

Simple Static Bokeh Plot

+

Minimal Bokeh demo demonstrating how to create a simple bokeh plot from code

+ +

KMeans Demo in Panel

+

Interactive KMeans Chart using Panel + + WARNING: This examples takes a little longer to load. So be patient :) +

+ +

Simple Panel Demo

+

Simple demo showing Panel widgets interating with parts of the page -

REPL2

+ WARNING: This examples takes a little longer to load. So be patient :) +

+ + +

REPL

+

A Python REPL (Read Eval Print Loop).

+ +

REPL2

A Python REPL (Read Eval Print Loop) with slightly better formatting.

+ +

Simple script

+

A static demo of the <py-script> tag

+ +

Simple script 2

+

A dynamic demo of the <py-script> tag

+ +

TODO App

+

Demo showing how would a Simple TODO App would look like in PyScript tag

- + diff --git a/pyscriptjs/examples/repl.html b/pyscriptjs/examples/repl.html index 5944e034a03..806a73c015c 100644 --- a/pyscriptjs/examples/repl.html +++ b/pyscriptjs/examples/repl.html @@ -7,7 +7,7 @@ Svelte app - + diff --git a/pyscriptjs/examples/repl2.html b/pyscriptjs/examples/repl2.html index 3b150e3bae2..145ee91240c 100644 --- a/pyscriptjs/examples/repl2.html +++ b/pyscriptjs/examples/repl2.html @@ -7,7 +7,7 @@ Svelte app - + diff --git a/pyscriptjs/examples/simple_script.html b/pyscriptjs/examples/simple_script.html index 467e1837bb5..f1822741ded 100644 --- a/pyscriptjs/examples/simple_script.html +++ b/pyscriptjs/examples/simple_script.html @@ -13,7 +13,7 @@ -
+
from datetime import datetime now = datetime.now() diff --git a/pyscriptjs/examples/simple_script2.html b/pyscriptjs/examples/simple_script2.html index d32860cb41a..431a5c7d699 100644 --- a/pyscriptjs/examples/simple_script2.html +++ b/pyscriptjs/examples/simple_script2.html @@ -7,15 +7,15 @@ Svelte app - + -
-
-
+
start time:
+
+
from datetime import datetime now = datetime.now() diff --git a/pyscriptjs/src/interpreter.ts b/pyscriptjs/src/interpreter.ts index 9e4121aac7c..8578f8510cc 100644 --- a/pyscriptjs/src/interpreter.ts +++ b/pyscriptjs/src/interpreter.ts @@ -35,7 +35,7 @@ class PyScript: console.log(f"DATA/IMAGE: {value}") document.getElementById(element_id).innerHTML = f'
' else: - document.getElementById(element_id).innerHTML = repr(value); + document.getElementById(element_id).innerHTML = value; console.log(f"ELSE: {append} ==> {element_id} --> {value}") @staticmethod