OLD | NEW |
(Empty) | |
| 1 Learn how you can use client-side Python on your webpage. |
| 2 Use the python |difflib| module to generate attractive online |
| 3 textual diffs. |
| 4 Develop inside Google Chrome, using a hot off the presses version |
| 5 of our NaCl Dev Environment, running on a webpage, |
| 6 powered by Portable Native Client. |
| 7 The techniques in this codelab also apply to other interpreted languages |
| 8 we've ported to PNaCl, including: Python, Lua, Ruby, Tcl, Bash, and Forth. |
| 9 |
| 10 Requirements: |
| 11 * A Desktop / Laptop Windows, Mac, Linux, or ChromeOS browser |
| 12 |python_check| |
| 13 * A fast broadband connection (500MB download) |
| 14 * Can read and write Python |
| 15 |
| 16 |
| 17 .. |difflib| raw:: html |
| 18 |
| 19 <a href="https://docs.python.org/2/library/difflib.html" |
| 20 target="_blank">difflib</a> |
| 21 |
| 22 |
| 23 .. |python_check| raw:: html |
| 24 |
| 25 <br/><span id="python_compat" style="color: #cccc00" |
| 26 >Checking browser compatibility...</span><br/> |
| 27 <i id="python_compat2"></i> |
| 28 <script> |
| 29 var tag = document.getElementById('python_compat'); |
| 30 var tag2 = document.getElementById('python_compat2'); |
| 31 if (!('application/x-pnacl' in navigator.mimeTypes)) { |
| 32 tag.innerHTML = |
| 33 'This codelab does not appear to be supported by your browser.'; |
| 34 tag.style.color = '#cc0000'; |
| 35 tag2.innerHTML = |
| 36 'You do not appear to be running a browser such as ' + |
| 37 'Google Chrome which supports Portable Native Client ' + |
| 38 'or you have disabled Portable Native Client.'; |
| 39 } else { |
| 40 tag.innerHTML = 'This codelab appears to be supported by your browser.'; |
| 41 tag.style.color = '#00cc00'; |
| 42 } |
| 43 </script> |
OLD | NEW |