blob: 602491f1a87b51a707aaffd07ce5381d143b2fb9 [file] [log] [blame]
Learn how you can use client-side Python on your webpage.
Use the python |difflib| module to generate attractive online
textual diffs.
Develop inside Google Chrome, using a hot off the presses version
of our NaCl Dev Environment, running on a webpage,
powered by Portable Native Client.
The techniques in this codelab also apply to other interpreted languages
we've ported to PNaCl, including: Python, Lua, Ruby, Tcl, Bash, and Forth.
* A Desktop / Laptop Windows, macOS, Linux, or Chrome OS browser
* A fast broadband connection (500MB download)
* Can read and write Python
.. |difflib| raw:: html
<a href=""
.. |python_check| raw:: html
<br/><span id="python_compat" style="color: #cccc00"
>Checking browser compatibility...</span><br/>
<i id="python_compat2"></i>
var tag = document.getElementById('python_compat');
var tag2 = document.getElementById('python_compat2');
if (!('application/x-pnacl' in navigator.mimeTypes)) {
tag.innerHTML =
'This codelab does not appear to be supported by your browser.'; = '#cc0000';
tag2.innerHTML =
'You do not appear to be running a browser such as ' +
'Google Chrome which supports Portable Native Client ' +
'or you have disabled Portable Native Client.';
} else {
tag.innerHTML = 'This codelab appears to be supported by your browser.'; = '#00cc00';