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;

Music On Bay

Music Blog Best Music Extractor Online: https://www.conversion-tool.com/voiceseparator/ https://www.lalal.ai/ In the world of music enthusiasts, artists, and producers, the ability to separate and extract individual elements from an audio file is nothing short of magic. It's like peeling back the layers of a painting to examine each brushstroke or studying the ingredients of a delicious dish to recreate its flavors. Just as these processes deepen our understanding and appreciation, music extraction enhances our grasp of the intricate elements that constitute a piece of music. The concept of music extraction isn't entirely new, but recent advancements in technology have elevated it to unprecedented levels. The days of hearing a captivating melody and wondering about its constituent instruments or vocals are over. With cutting-edge online too...

AI on Brain: Neuralink

Brain-chip startup Neuralink, founded by Elon Musk, has received permission to begin its first human trial, focusing on paralysis caused by spinal cord injuries or ALS. Neuralink, a brain-chip startup founded by billionaire entrepreneur Elon Musk , has obtained permission to kick off its first human trial. The focus of the clinical study will be on patients suffering from paralysis caused by cervical spinal cord injuries or amyotrophic lateral sclerosis (ALS). The announcement came on September 19 although the specific number of participants remains undisclosed. Initially, Neuralink aimed to receive approval for 10 participants, but after safety concerns were raised by the U.S. Food and Drug Administration (FDA), the company found itself negotiating for a smaller participant pool. ...