Bonjour, je m'appelle Issam. Puis-je vous aider?
Conception de site web

Hello World In PyScript

  1. Home
  2. /
  3. Web Development
  4. /
  5. Hello World In PyScript

écrit par :Chafik Afroune

PyScript
PyScript

What is pyscript ??

PyScripter is javascript but with python keywords ,Its a flexible framework that developers can build on to create extensible components directly in Python easily like javascript but more easier, Developed by a team from Anaconda including Peter Wang, Fabio Pliger, and Philipp Rudiger, it’s, as Peter mentioned in his talk, “a system for interleaving Python in HTML (like PHP). » This means you can write and run Python code in HTML, call Javascript libraries in PyScript, and do all your web development in, so it’s a javascript librairie

How To Say Hello World ??

In normal html template we import the library in script tag ( the css is used to style the script output )

<!DOCTYPE html>
<html>
   <head>
      <title>Page Title</title>
      <!-- pyscript -->
      <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
      <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
   </head>
   <body>
       
   </body>
</html>

now lets say hello world 🙂

<!DOCTYPE html>
<html>
   <head>
      <title>Page Title</title>
      <!-- pyscript -->
      <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
      <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
   </head>
   <body>
      <py-script>
         print("Hello World !!") #We just created a new world !!
      </py-script>
   </body>
</html>

conception de site web

sur mesure

  • conception de site web Faites nous parvenir votre besoin et nous ferons un devis précis

Voir le site

Leave a Reply

Your email address will not be published.

Sarl WD Webdispo

  • Promotion Immobilière El Bouroudj, Dely Brahim, Alger.
  • WhatsApp/Viber: +90 534 396 01 87