Skip to content

Commit

Permalink
Deployed 24465ca to 2024.2.1 with MkDocs 1.5.3 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fpliger committed Feb 26, 2024
1 parent 35e94fd commit e6fb4c6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion 2024.2.1/beginning-pyscript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ <h3 id="indexhtml">index.html</h3>
behaviour we need to write some Python. Specifically, we need to define the
<code>translate_english</code> function, used when the button is clicked.</p>
<h3 id="mainpy">main.py</h3>
<p>The behaviour of the appication is defined in <code>main.py</code>. It looks like this:</p>
<p>The behaviour of the application is defined in <code>main.py</code>. It looks like this:</p>
<div class="language-python highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">main.py</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-5-1">1</a></span>
<span class="normal"><a href="#__codelineno-5-2">2</a></span>
<span class="normal"><a href="#__codelineno-5-3">3</a></span>
Expand Down
2 changes: 1 addition & 1 deletion 2024.2.1/developers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ <h2 id="contributing">Contributing</h2>
our GitHub repository.</p>
</li>
<li>
<p>Every Tusday is a community video call, the details of which are posted onto
<p>Every Tuesday is a community video call, the details of which are posted onto
the discord server. Face to face technical discussions happen here.</p>
</li>
<li>
Expand Down
Binary file modified 2024.2.1/sitemap.xml.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions 2024.2.1/user-guide/architecture/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ <h3 id="polyscript">PolyScript</h3>
<li><a href="https://pyscript.github.io/polyscript/#hooks">Hooks</a>, called at clearly
defined moments in the page lifecycle, provide a means of calling user
defined functions to modify and enhance PolyScript's default behaviour.</li>
<li><a href="https://pyscript.github.io/polyscript/#interpreter-features">Multipe interpreters</a>
<li><a href="https://pyscript.github.io/polyscript/#interpreter-features">Multiple interpreters</a>
(in addition to Pyodide and MicroPython, PolyScript works with Lua and Ruby -
although these are beyond the scope of this project).</li>
</ul>
Expand Down Expand Up @@ -1042,7 +1042,7 @@ <h3 id="pyodide">Pyodide</h3>
Packages containing C extensions that <em>are not compiled for WASM</em> cause the
"pure Python wheel" error.</p>
<p>There are plans afoot to make WASM a target in PyPI so packages with C
extenions are automatically compiled to WASM.</p>
extensions are automatically compiled to WASM.</p>
</div>
<h3 id="micropython">MicroPython</h3>
<p><a href="https://micropython.org/"><img src="../../assets/images/micropython.png"/></a></p>
Expand Down
2 changes: 1 addition & 1 deletion 2024.2.1/user-guide/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ <h3 id="files">Files</h3>
copied into the same directory on the file system. To aid readability and
reduce repetition, the <code>files</code> option comes with a mini
<a href="https://en.wikipedia.org/wiki/Template_processor">templating language</a>
that allows re-usable placeholders to be defined between curly brackets (<code>{</code>
that allows reusable placeholders to be defined between curly brackets (<code>{</code>
and <code>}</code>). When these placeholders are encountered in the <code>files</code> configuration,
their name is replaced with their associated value.</p>
<div class="admonition attention">
Expand Down
10 changes: 5 additions & 5 deletions 2024.2.1/user-guide/dom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ <h2 id="ffi">FFI</h2>
</div>
<h2 id="pydom">PyDom</h2>
<p>The Standard Web APIs are massive and not always very user-friendly. <code>PyDom</code> is a
Python modue that exposes the power of the web with an easy and idiomatic Pythonic
Python module that exposes the power of the web with an easy and idiomatic Pythonic
interface on top.</p>
<p>While the <a href="#ffi">FFI</a> interface described above focuses on giving full access to
the entire Standard Web APIs, <code>pydom</code> focuses on providing a small, intuitive and yet
Expand All @@ -958,7 +958,7 @@ <h2 id="pydom">PyDom</h2>
feature parity. On the contrary, it's intentionally small and focused on the most popular
use cases while still providing [a backdoor] access to the full JS API.</p>
<p><code>Pydom</code> draws inspiration from popular Python APIs/Libraries known to be friendly and
easy to learn, and other successful projects related the web as well (for isntance,
easy to learn, and other successful projects related the web as well (for instance,
<code>JQuery</code> was a good source of inspiration).</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
Expand All @@ -970,7 +970,7 @@ <h3 id="core-concepts">Core Concepts</h3>
<ul>
<li><strong><code>Element</code>:</strong> any component that is part of a web page. This is a rough abstraction of an
<a href="https://developer.mozilla.org/en-US/docs/Glossary/Element">HTMLElement</a>. In general,
<code>pydom</code> elements always map to an underlying <code>HTML</code> <code>Element</code> in a we page</li>
<code>pydom</code> elements always map to an underlying <code>HTML</code> <code>Element</code> in a web page</li>
<li><strong><code>ElementCollection</code>:</strong> a collection of one or more <code>Elements</code>. It is a rough abstraction
of a <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection">HTMLCollection</a>.</li>
<li><strong>Querying:</strong> a method to query elements on a page based on a
Expand All @@ -985,7 +985,7 @@ <h3 id="element">Element</h3>
elements are always in sync and any change of state in one is reflect into the other.</p>
<h4 id="creating-a-new-element">Creating a new element</h4>
<p>New elements can be created by using the <code>pydom.create</code> method and passing the type of element
being crated. Here's an example of what it looks like:</p>
being created. Here's an example of what it looks like:</p>
<p>(To execute and explore the following code, click on the "load" button. The result will be
conveniently displayed in the box on the below of the code example)</p>
<div class="language-python highlight"><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="kn">from</span> <span class="nn">pyweb</span> <span class="kn">import</span> <span class="n">pydom</span>
Expand Down Expand Up @@ -1020,7 +1020,7 @@ <h4 id="setting-the-content-of-an-element">Setting the content of an element</h4
requiring any extra logic from the user.</p>
<h4 id="changing-the-element-style">Changing the element style</h4>
<p>Elements have a <code>style</code> attribute that can be used to change the element style rules.
The style attribyte can be used as a dictionary and, to set a style rule for the element,
The style attribute can be used as a dictionary and, to set a style rule for the element,
simply set the correct key on the <code>.style</code> attribute. For instance, the following
code changes the background color of the element just created in the example above:</p>
<div class="language-python highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="n">new_p</span><span class="o">.</span><span class="n">style</span><span class="p">[</span><span class="s2">&quot;background-color&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;yellow&quot;</span>
Expand Down
10 changes: 5 additions & 5 deletions 2024.2.1/user-guide/plugins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@


<h1 id="plugins">Plugins</h1>
<p>PyScript, like many other software plaforms, offers a Plugin API that can be used to extend its
<p>PyScript, like many other software platforms, offers a Plugin API that can be used to extend its
own functionality without the need to modify its own core. By using this API, users can add new
features and distribute them as plugins.</p>
<p>At the moment, PyScript supports plugins written in Javascript. These plugins can use PyScript
Expand Down Expand Up @@ -888,9 +888,9 @@ <h3 id="code-execution-methods">Code Execution Methods</h3>
This means that long-running code or blocking calls can or will block the thread, leading to an unresponsive
page and a bad user experience.</li>
<li>web workers: code executed in workers actually run on "background" threads. This means the code can perform
tasks without interfering with the user interface or other operations being perfomed in the main thread. While
tasks without interfering with the user interface or other operations being performed in the main thread. While
this adds great flexibility it's important to understand that workers actually have limited capabilities when
comparing to code executed on the main thread. For instace, while PyScript offers a DOM API that actually can
comparing to code executed on the main thread. For instance, while PyScript offers a DOM API that actually can
be used in web workers on the browser, by default, does not allow DOM operation in workers. So, in this case,
if you just use <code>window</code> and <code>document</code> directly mapping the Javascript FFI provided directly by the interpreters
we support (Pyodide and MicroPython). With that in mind, <code>from pyscript import window, document</code> will work and
Expand All @@ -910,10 +910,10 @@ <h3 id="code-execution-methods">Code Execution Methods</h3>
<p>In general, we recommend executing your code on workers unless there are explicit reasons preventing users from
doing that.</p>
<h3 id="lifecycle-events">Lifecycle Events</h3>
<p>During the execution of a PyScript application there are specfic events that capture the beginning
<p>During the execution of a PyScript application there are specific events that capture the beginning
or the end of specific stages. Here are the main lifecycle events of a PyScript Application:</p>
<p>Every script or tag running through PyScript inevitably passes through some main or worker thread related tasks.</p>
<p>In both worlds (wither executing code in the main thread or on a web worker), the exact sequence of steps around code execution is the following:</p>
<p>In both worlds (whether executing code in the main thread or on a web worker), the exact sequence of steps around code execution is the following:</p>
<ul>
<li><strong>ready</strong> - the DOM recognized the special script or tag and the associated interpreter is ready to work. A <em>JS</em> callback might be useful to instrument the interpreter before anything else happens.</li>
<li><strong>before run</strong> - there could be some <em>JS</em> code setup specific for the script on the main thread, or the worker. This is similar to a generic <em>setup</em> callback in tests.</li>
Expand Down
2 changes: 1 addition & 1 deletion 2024.2.1/user-guide/running-offline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@


<h1 id="running-pyscript-offline">Running PyScript Offline</h1>
<p>Althought users will want to create and share PyScript apps on the internet, there are cases when user want to run PyScript applications offline, in an airgapped fashion. This means that both PyScript core and the interpreter used to run code need to be served with the application itself. In short, the 2 main explicit tasks needed to create an offline PyScript application are:</p>
<p>Although users will want to create and share PyScript apps on the internet, there are cases when user want to run PyScript applications offline, in an airgapped fashion. This means that both PyScript core and the interpreter used to run code need to be served with the application itself. In short, the 2 main explicit tasks needed to create an offline PyScript application are:</p>
<ul>
<li>download and include PyScript core (<code>core.js</code>)</li>
<li>download and include the [Python] interpreters you want to use in your Application</li>
Expand Down

0 comments on commit e6fb4c6

Please sign in to comment.