이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Image

PyPlugger for PyScript

설명

PyPlugger for PyScript adds a link to the PyScript stylesheet and JavaScript source file to the head and footer of your WordPress website and also deactivates the wptexturize functions to remove syntax errors resulting from modified quotation marks.

스크린샷

  • Image
    Installation & Activation of PyPlugger for PyScript
  • Image
    PyScript Hello World Command Example
  • Image
    PyScript Hello World Command Results
  • Image
    Deactivate PyPlugger for PyScript
  • Image
    Delete PyPlugger for PyScript

설치

  1. Log in to your WordPress admin area.
  2. Navigate to the “Plugins” sidebar menu section and click “Add New”.
  3. In the search field type, “PyPlugger for PyScript” and click “Search Plugins”.
  4. Once you’ve found the plugin, click the “Install Now” button.
  5. After it installs, click on the “Activate Plugin” link.

or

  1. Upload the plugin folder to your /wp-content/plugins/ folder.
  2. Go to the Plugins page and activate the plugin.

FAQ

What is PyScript

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.

You can find out more about PyScript at: (https://pyscript.net/)

How do I use the PyPlugger for PyScript?

Once activated, go to any page or post and enter Pythonic commands between the following PyScript tags as HTML content:

<py-script> </py-script>

For example, to print a “Hello World!” statement, you would enter the following as html content:

<py-script> print('Hello World!') </py-script>

An additional feature to create an REPL: Read, Evaluate, Print, Loop component can be rendered by using the following tag:

<py-repl> </py-repl>

Then, on the end-user page, enter data for evaluation and then press SHIFT+ENTER to compute.

Are you or the PyPlugger for PyScript plugin associated with the official PyScript Organization?

No, neither I nor the PyPlugger for PyScript plugin are associated with the official PyScript Organization nor any of its’ parent companies, sister companies, nor subsidiaries which may include Pyodide or Anaconda Inc.

I developed the PyPlugger for PyScript plugin in adherence to the PyScript’s Organization’s governance policy for use of its’ trademark and open-source license, which can be found on their GitHub repository at the following link: (https://github.com/pyscript/governance)

Why did you develop the PyPlugger for PyScript plugin?

I developed the PyPlugger for PyScript plugin out of curiosity. I love a challenge and wanted to see if it would work on one of my websites as this is the very first plugin I’ve ever developed for WordPress. I also wanted to make it available free of charge as I am excited about learning Python and PHP, and I would like to contribute to the software development community beyond Twitter and GitHub. As a newbie freelance software developer, I thought this would also be a great opportunity to add experience to my resume by publishing a plugin to the mostly widely used content management system in the world, one that I’ve used for almost a decade as a hobbyist Web Administrator and Front-End Web Developer, which is WordPress.

Can I send you a donation?

I thought you’d never ask, and you most certainly can! I would be honored to accept your donation to further my learning experience in Software Development. Please use the following link for your generous offer, and I humbly thank you with great joy in advance:
(https://technocannon.com/donate)

How to uninstall the PyPlugger for PyScript plugin?

I’m sorry you are unsatisfied with the PyPlugger for PyScript plugin.

Simply deactivate and delete the plugin.

I also ask that you leave some feedback if you can spare the time so I can learn how to improve the PyPlugger for PyScript plugin.

후기

Image
2022년 6월 12일
Thanks a lot this works perfectly. I wanted to test running the Python REPL in a WordPress post, using the HTML code, but it threw errors: JsException(PythonError: Traceback (most recent call last): File "/lib/python3.10/site-packages/_pyodide/_base.py", line 421, in eval_code CodeRunner( File "/lib/python3.10/site-packages/_pyodide/_base.py", line 237, in __init__ self.ast = next(self._gen) File "/lib/python3.10/site-packages/_pyodide/_base.py", line 141, in _parse_and_compile_gen mod = compile(source, filename, mode, flags | ast.PyCF_ONLY_AST) File "", line 1 print(‘Test your code here’) ^ SyntaxError: invalid character '‘' (U+2018) ) Until i installed this plugin. Now the REPL runs within a Wordpress post! Its crazy to think what Pyscript is now capable of! Before i had to put static code into my WP posts when writing a tutorial post, but now readers can test the code in real time. Thanks a lot for the effort of putting this together
모든 1 평가 읽기

기여자 & 개발자

“PyPlugger for PyScript”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “PyPlugger for PyScript”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

Released – May 6 2022