Skip to main content

Python in HTML


 Wondering how to host python codes online, that to even on websites, just by embedded code!

Your wait is over !

Below shows a sample code on doing, using python library, namely pyscript.

Code:

<head>

    <link

        rel="stylesheet"

        href="https://pyscript.net/releases/2023.11.2/core.css"

    />

    <script

        type="module"

        src="https://pyscript.net/releases/2023.11.2/core.js"

    ></script>

</head>

<body>

    <script type="py" terminal>

        from pyscript import display

        display("Hello World!") # this goes to the DOM

        #print("Hello terminal") # this goes to the terminal

    </script>

</body>

wait no more try it on your website!

#happycoding


Comments

Popular posts from this blog

What to do for streamlit error : "`label` got an empty value. "

  To overcome the error : "`label` got an empty value. This is discouraged for accessibility reasons and may be disallowed in the future by raising an exception. Please provide a non-empty label and hide it with label_visibility if needed." Do below steps: 1. Do check for empty strings:      option = st.selectbox( ' ' , list_options)                                           ^     replace the empty string:  ' ' with any text :'below;

How to Create and Scan Spotify Codes

How to Create and Scan Spotify Codes in 2023 Spotify Codes are QR-like images that can be used to quickly open songs, albums, playlists, and other content in the Spotify app. To create a Spotify Code, you can use the Spotify desktop app, web player, or mobile app. Create a Spotify Code using the desktop app (Windows and Mac) 1. Open the Spotify desktop app or web player and open the song you would like to share from your library. 2. Click on the horizontal three dots menu next to the song listing and choose **Share** → **Copy Song Link**. 3. Having copied the song's link, head to the [Spotify Codes website]( https://www.spotifycodes.com/ ), paste the link in the textbox, and click “Get Spotify Code”. 4. The website will now generate the scannable Spotify code for the song you requested. Create a Spotify Code using the mobile app (Android and iOS) 1. Open the Spotify mobile app and open the song you would like to share from your library. 2. Tap on the vertical th

CREDIT CARD FRAUD DETECTION