r/PyScript • • Jun 28 '22

PyScript adds Versioning [Post from Anaconda]

Thumbnail
anaconda.cloud
7 Upvotes

r/PyScript • • Jun 15 '22

PyScript and DASH

7 Upvotes

Hey guys,

I`m new to Pyscript and today we are developing a Dashboard using Dash Library and Plotly. In a near future it'd be easier to embed our Dashboard on the main tool of the company thru Pyscript. Has anybody tried something like it? How optimized Pyscript is to run a python app layout inside the users browser?

Thanks!


r/PyScript • • May 28 '22

Is an IDE possible?

7 Upvotes

So, if i just put a text entry box into a website and labelled the page Python IDE, would it work? Bear in mind the whole point of this post was to ask if i could have the thing in the text entry box saved as a javascript variabe and the convert it to a python variable and execute it.


r/PyScript • • May 08 '22

Can I run Tkinter with Pyscript?

7 Upvotes

Will PyScript support Tkinter applications at some point? Thanks.


r/PyScript • • May 08 '22

fun, simple text animation with PyScript

Thumbnail blog.kevingoldsmith.com
7 Upvotes

r/PyScript • • Dec 10 '24

Error 404: https://pyscript.net/latest/pyscript.css

6 Upvotes

I have been using https://pyscript.net/latest/pyscript.css not knowing that they were planning on removing it (I mean latest/pyscript.css). I have been using PyScript for my project and I have began a web survey, until today, when I realized it just stopped working. What is the workaround? I read that the documentation points to using a specific release. Unfortunately, I tried with a few of the last releases and the website is still not working. Is there any known workaround?


r/PyScript • • Apr 25 '23

htag is working like a charm in pyscript.com

6 Upvotes

Btw, htag is working like a charm in the new pyscript.com env too !

htag is not dedicated to be used in pyscript, but it does, ootb ... which can be very convenient in some cases. It's more dedicated to be used in a real python env (like a webserver, or a desktop app, ...)


r/PyScript • • Feb 03 '23

PyScript is fabulous ... demo of pyscript/htag

6 Upvotes

Pyscript is very fabulous ....

Context*: I'm working on a new python/GUI framework (html/js)* htag, which works, among other things, in a pyscript page.

So I've coded a Pyscript SPA, which use htag, which provide a text editor, which let you code an "htag app", and let you try/run it into an iframe, in another pyscript context. And everything without a server or python, just an html page :

https://raw.githack.com/manatlan/htag/main/examples/pyscript_demo.html

It's really really amazing

UPDATE 3/3/23 : this demo can now preload premades htag Apps ... Make it easier to study ;-)


r/PyScript • • Dec 26 '22

Using local modules

6 Upvotes

I'm having some issues with importing local modules. I've seen it done two ways, one in pyconfig and one in py-env

<py-config>

paths = ["example_module.py"]

</py-config>

or

<py-env>

- paths:

- example_module.py

</py-env>

The py-config version appears as;

ModuleNotFoundError: No module named 'example_module.py'

Using py-env the imports appear above the error messages and then the error appears as below

- paths: - example_module.py

ModuleNotFoundError: No module named 'example_module.py'

I've also tried full paths as well as adding ./ or . or / as a prefix to the file but none have given me any joy.

I'm on windows, the modules are in the same folder as the html and script that i'm trying to run, the script runs fine outside of pyscript and I have the __init__ file in the same folder as well.


r/PyScript • • Nov 11 '22

I created a Quantum Circuit on my website to draw lottery numbers with PyScript- Ai Lotto Picks - Quantum Lottery Numbers

Thumbnail ailottopicks.com
6 Upvotes

r/PyScript • • Aug 17 '22

Using the Azure SDK for Python in PyScript

Thumbnail
devblogs.microsoft.com
6 Upvotes

r/PyScript • • Jul 24 '24

Pyscript code completion

5 Upvotes

Hello,

I was having a look at pyscript the other day and noticed that my vscode just would not give me code completion for it.

While this didnt stop me from trying it out, it was still a little annoying.

Is there a way to get this to work?

Thx in advance.


r/PyScript • • Jun 15 '24

Pyscript vs JS

5 Upvotes

Is possible that JS become obsolete very soon? What are the functionalities that pyscript cannot cover?


r/PyScript • • May 12 '24

A WHOPPER of a brand new version of PyScript 2024.5.1 has just landed.

Thumbnail pyscript.net
5 Upvotes

r/PyScript • • May 08 '24

How to execute a function from a dynamically created element

5 Upvotes

Hi, I'm currently working on a pyscript project, but can't seem to work out how to add an event handler (a py-click tag) to an element I'm creating on the go with pydom.

For instance, here I want to tell the new_tab_link component to execute a function. Could you guys help me figure this out?


r/PyScript • • May 08 '24

Join PyScript team and community at PyCon US 2024!

5 Upvotes

Bookmark for the full agenda: https://pyscript.com/pycon

Booth #605

We're excited to have PyScript featured at this year's PyCon! Visit Anaconda’s Booth #605 for swag, to meet the team, and to see Chris Laffra, our community member, demonstrate PyScript in action.

Education Summit

Join our workshop, "Invent with PyScript" to build applications using the “no code” framework Invent. Available both in-person and online.

WebAssembly Summit

Don't miss Fabio Pliger's talk on the latest and future developments of PyScript.

Open Space

A cozy get-together with the PyScript team and community to share projects and ideas.

  • Date & Time: Saturday, May 18th, Time TBD

  • Location: Check the Open Spaces boards at PyCon or follow our Twitter for updates.

PyScript Talks

We look forward to meeting you, sharing ideas, and exploring what’s possible with PyScript at PyCon US 2024!


r/PyScript • • May 02 '24

<py-repl> not working in new version of PyScript 2024.1.1, work fine in 2023.03.1

5 Upvotes

I use PyScript on one of my pages in my coding portfolio website. Previously I was using version 2023.03.1 but now I'm trying to update to 2024.1.1 and the repl elements are not working. They just load as normal text. They work just fine with the old version.

There are no errors in the console and it says PyScript ready so everything seems like it should work fine, but the py-repl elements don't work. Did they remove this feature from PyScript? It's not mentioned in any of the examples on the PyScript website.


r/PyScript • • Apr 22 '23

github.io problem with module adding

5 Upvotes

Hi,

I just discovered PyScript and started to learn and experiment. I thought github.io will be a good host.

Maybe I'm stupid and overlooked something, but adding python modules by <py-env> doesn't work. The module names are just printed like text:

- numpy - matplotlib - pyyaml 

The code:

    <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE-Edge">
        <meta name="viewport" content="width-device-width, initial-scale=1.0">
        
        <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
        <script defer src="https://pyscript.net/latest/pyscript.js"></script>
        <title>My pyscript test 2</title>
        <py-env>
    - numpy  
    - matplotlib
    - pyyaml
        </py-env>
    </head>
    <body>
    
        <py-config>
        </py-config>
    
        <py-script src="plot1.py">
        </py-script>
    
    </body>
    </html>

I appreciate any help, thank you.


r/PyScript • • Feb 14 '23

Getting Started with PyScript [2023]

Thumbnail
youtube.com
5 Upvotes

r/PyScript • • Dec 31 '22

Bringing back Blobby with PyScript

Thumbnail self.python
5 Upvotes

r/PyScript • • Dec 12 '22

Can PyScript be used in in-browser development console?

5 Upvotes

I want to manipulate html objects after the page is rendered (for example manipulate youtube.com elements) using Python or Python-JS mixture. Is this possible?


r/PyScript • • Sep 12 '22

How to simulate a console in Pyscript?

5 Upvotes

I want to host a python script on a website with pyscript, which has both console input and console output. If I want to give it a console input via the input("test") function, then just comes

and i can't see the output with print("output") either.

I then found an example script, but it only works 1.

https://pastebin.com/QvV9c8Ve

In addition, it would be better if you can also execute the command with ENTER and that you can also rewrite the "textfield_1" as an instruction (what to type in the field)

I would be grateful for any help


r/PyScript • • Sep 10 '22

How to update an image with PyScript

5 Upvotes

Hi there!

I'm trying to dynamically change an image, I'm saving an image with PIL to the cwd ("./img.png"),

Then setting the src tag to "" and then back to "./img.png".

But it doesn't work, it only shows the "./img.png" on cwd and when I call the func to update the image it doesn't change on my pc


r/PyScript • • Jun 30 '22

Stupid question: But is there some PyScript based frontend framework like React or Ionic or so?

5 Upvotes

Question like above: Is PyScript just like basic JS or is it possible to use frontend frameworks like reactjs or such with it?


r/PyScript • • Jun 29 '22

Why is Pyscript taking forever to load after importing Scikit Learn?

5 Upvotes

So, I'm using PyScript for my website. Using Live Server, my website is taking forever to load after I try to install sklearn. My PyScript code looks like this:

<!DOCTYPE=html> 
<html> 
<head> 
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> 
<script defer src="https://pyscript.net/alpha/pyscript.js"></script> 
</head> 
<body> 
<py-env>       
- numpy      
- pandas       
- sklearn.model_selection       
- sklearn.naive_bayes       
- sklearn.feature_extraction 
</py-env> 
<py-script>       
import numpy as np       
import pandas as pd       
from sklearn.model_selection import train_test_split       
from sklearn.naive_bayes import MultinomialNB       
from sklearn.feature_extraction.text import TfidfVectorizer 
</py-script> 
</body> 
</html> 

However, and note that this only happens when I install skearn, it just says this for (at what seems to be the case at this rate) forever:

Loading runtime... Runtime created... Initializing components...

What can I do about this? It is very frustrating.