您当前的位置: 首页 >  Python

彭世瑜

暂无认证

  • 3浏览

    0关注

    2791博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Python:pyscript.js浏览器中运行Python代码

彭世瑜 发布时间:2022-05-07 10:04:08 ,浏览量:3

PyScript is a framework that allows users to create rich Python applications in the browser using HTML’s interface. PyScript aims to give users a first-class programming language that has consistent styling rules, is more expressive, and is easier to learn.(摘自pyscript.net)

PyScript是一个允许用户使用HTML界面在浏览器中创建丰富Python应用程序的框架。PyScript旨在为用户提供一种一流的编程语言,该语言具有一致的样式规则、更具表现力、更易于学习。(-- 百度翻译)

文档:

  • https://pyscript.net/
  • https://github.com/pyscript/pyscript/blob/main/GETTING-STARTED.md
  • https://github.com/pyscript/pyscript

代码示例



    
      
      
    


  
from datetime import datetime

now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print(now)
print('Hello, World!')
  




页面输出结果

2022-05-07 09:57:04
Hello, World!
关注
打赏
1665367115
查看更多评论
立即登录/注册

微信扫码登录

0.4607s