€• Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ ”Œchildren”]”Œdocutils.nodes”Œsection”“”)�”}”(hhh]”(h Œtitle”“”)�”}”(hŒGetting started”h]”h ŒText”“”ŒGetting started”…”�”}”(hhŒparent”hhhŒsource”NŒline”NubaŒ
attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”uŒtagname”hhhhhhŒY/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/docs/sphinx/installation_use.rst”hKubh)�”}”(hhh]”(h)�”}”(hŒInstallation”h]”hŒInstallation”…”�”}”(hh1hh/hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhh,hhhh+hKubh Œ paragraph”“”)�”}”(hX« Transcrypt is currently tested under Windows, Linux and OSX, with Chrome, Internet Explorer and Firefox. To be able to use it, Python 3.9 has to be installed. After that, install *virtualenv* as explained in `Jamie Matthews very clear and brief introduction `_. Be sure to install virtualenv for the right Python version, by using the right *pip*. For each Transcrypt project (or group of projects using the same Transcrypt version) create an environment as described in the referenced introduction. To install Trancrypt into that environment, *activate* the environment as also described there, and then type:”h]”(hŒ³Transcrypt is currently tested under Windows, Linux and OSX, with Chrome, Internet Explorer and Firefox. To be able to use it, Python 3.9 has to be installed. After that, install ”…”�”}”(hŒ³Transcrypt is currently tested under Windows, Linux and OSX, with Chrome, Internet Explorer and Firefox. To be able to use it, Python 3.9 has to be installed. After that, install ”hh?hhhNhNubh Œemphasis”“”)�”}”(hŒ*virtualenv*”h]”hŒ
virtualenv”…”�”}”(hhhhJubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhh?ubhŒ as explained in ”…”�”}”(hŒ as explained in ”hh?hhhNhNubh Œ reference”“”)�”}”(hŒ}`Jamie Matthews very clear and brief introduction `_”h]”hŒ0Jamie Matthews very clear and brief introduction”…”�”}”(hŒ0Jamie Matthews very clear and brief introduction”hh_ubah}”(h ]”h"]”h$]”h&]”h(]”Œname”Œ0Jamie Matthews very clear and brief introduction”Œrefuri”ŒGhttps://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/”uh*h]hh?ubh Œtarget”“”)�”}”(hŒJ ”h]”h}”(h ]”Œ0jamie-matthews-very-clear-and-brief-introduction”ah"]”h$]”Œ0jamie matthews very clear and brief introduction”ah&]”h(]”Œrefuri”hquh*hrŒ
referenced”Khh?ubhŒQ. Be sure to install virtualenv for the right Python version, by using the right ”…”�”}”(hŒQ. Be sure to install virtualenv for the right Python version, by using the right ”hh?hhhNhNubhI)�”}”(hŒ*pip*”h]”hŒpip”…”�”}”(hhhh‡ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhh?ubhŒÆ. For each Transcrypt project (or group of projects using the same Transcrypt version) create an environment as described in the referenced introduction. To install Trancrypt into that environment, ”…”�”}”(hŒÆ. For each Transcrypt project (or group of projects using the same Transcrypt version) create an environment as described in the referenced introduction. To install Trancrypt into that environment, ”hh?hhhNhNubhI)�”}”(hŒ
*activate*”h]”hŒactivate”…”�”}”(hhhhšubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhh?ubhŒ8 the environment as also described there, and then type:”…”�”}”(hŒ8 the environment as also described there, and then type:”hh?hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhh,hhubh>)�”}”(hŒ*pip install transcrypt*”h]”hI)�”}”(hhµh]”hŒpip install transcrypt”…”�”}”(hhhh·ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhh³ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK hh,hhubh>)�”}”(hŒ}from the command prompt. This is the recommended way to install Transcrypt. It is flexible and sets the proper access rights.”h]”hŒ}from the command prompt. This is the recommended way to install Transcrypt. It is flexible and sets the proper access rights.”…”�”}”(hhÌhhÊhhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhh,hhubh>)�”}”(hŒVAlternatively, for manual installation under Windows or Linux, follow the steps below:”h]”hŒVAlternatively, for manual installation under Windows or Linux, follow the steps below:”…”�”}”(hhÚhhØhhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK
hh,hhubh Œenumerated_list”“”)�”}”(hhh]”(h Œ list_item”“”)�”}”(hŒ;Download the Transcrypt zip and unpack it anywhere you like”h]”h>)�”}”(hhïh]”hŒ;Download the Transcrypt zip and unpack it anywhere you like”…”�”}”(hhïhhñubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhhíubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhhèhhhh+hNubhì)�”}”(hŒ=Add *../Transcrypt-/transcrypt* to your system path
”h]”h>)�”}”(hŒ/transcrypt* to your system path”h]”(hŒAdd ”…”�”}”(hŒAdd ”hj ubhI)�”}”(hŒ$*../Transcrypt-/transcrypt*”h]”hŒ"../Transcrypt-/transcrypt”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒ to your system path”…”�”}”(hŒ to your system path”hj ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhhèhhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh*hæhh,hhhh+hKubh>)�”}”(hŒaTo enable minification, additionally the Java Runtime Environment 6 or later has to be installed.”h]”hŒaTo enable minification, additionally the Java Runtime Environment 6 or later has to be installed.”…”�”}”(hj= hj; hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhh,hhubh Œnote”“”)�”}”(hŒÝIf you install Transcrypt manually, Trancrypt is started by typing *run_transcrypt* rather than *transcrypt*. This allows a pip installed Transcrypt and a manually installed Transcrypt to be used side by side selectively.”h]”h>)�”}”(hjM h]”(hŒCIf you install Transcrypt manually, Trancrypt is started by typing ”…”�”}”(hŒCIf you install Transcrypt manually, Trancrypt is started by typing ”hjO ubhI)�”}”(hŒ*run_transcrypt*”h]”hŒrun_transcrypt”…”�”}”(hhhjW ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjO ubhŒ
rather than ”…”�”}”(hŒ
rather than ”hjO ubhI)�”}”(hŒ*transcrypt*”h]”hŒ
transcrypt”…”�”}”(hhhjj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjO ubhŒq. This allows a pip installed Transcrypt and a manually installed Transcrypt to be used side by side selectively.”…”�”}”(hŒq. This allows a pip installed Transcrypt and a manually installed Transcrypt to be used side by side selectively.”hjO ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjK ubah}”(h ]”h"]”h$]”h&]”h(]”uh*jI hh,hhhh+hNubjJ )�”}”(hŒÎIf you also use Numscrypt under Linux or OSX, use the MiniConda installer rather than *virtualenv*, as described in the Numscrypt documentation, since it will allow you to obtain the right version of NumPy.”h]”h>)�”}”(hj‹ h]”(hŒVIf you also use Numscrypt under Linux or OSX, use the MiniConda installer rather than ”…”�”}”(hŒVIf you also use Numscrypt under Linux or OSX, use the MiniConda installer rather than ”hj� ubhI)�”}”(hŒ*virtualenv*”h]”hŒ
virtualenv”…”�”}”(hhhj• ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj� ubhŒl, as described in the Numscrypt documentation, since it will allow you to obtain the right version of NumPy.”…”�”}”(hŒl, as described in the Numscrypt documentation, since it will allow you to obtain the right version of NumPy.”hj� ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhj‰ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*jI hh,hhhh+hNubh>)�”}”(hŒ†You can test your installation as follows (replacing *transcrypt* by *run_transcrypt* if you installed manually rather than with pip):”h]”(hŒ5You can test your installation as follows (replacing ”…”�”}”(hŒ5You can test your installation as follows (replacing ”hj´ hhhNhNubhI)�”}”(hŒ*transcrypt*”h]”hŒ
transcrypt”…”�”}”(hhhj½ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj´ ubhŒ by ”…”�”}”(hŒ by ”hj´ hhhNhNubhI)�”}”(hŒ*run_transcrypt*”h]”hŒrun_transcrypt”…”�”}”(hhhjÐ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj´ ubhŒ1 if you installed manually rather than with pip):”…”�”}”(hŒ1 if you installed manually rather than with pip):”hj´ hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhh,hhubhç)�”}”(hhh]”(hì)�”}”(hŒ[Go to directory *../Transcrypt-/transcrypt/development/automated_tests/transcrypt*”h]”h>)�”}”(hjî h]”(hŒGo to directory ”…”�”}”(hŒGo to directory ”hjð ubhI)�”}”(hŒK*../Transcrypt-/transcrypt/development/automated_tests/transcrypt*”h]”hŒI../Transcrypt-/transcrypt/development/automated_tests/transcrypt”…”�”}”(hhhjø ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjð ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjì ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjé hhhh+hNubhì)�”}”(hŒöFrom the command prompt run *transcrypt -b -c -da autotest*. This will compile the autotests into a number of .js files and put them into the *__target__* subdirectory. Do NOT go to that directory (there's no need, stay where you went at point 4)”h]”h>)�”}”(hj h]”(hŒFrom the command prompt run ”…”�”}”(hŒFrom the command prompt run ”hj ubhI)�”}”(hŒ*transcrypt -b -c -da autotest*”h]”hŒtranscrypt -b -c -da autotest”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒS. This will compile the autotests into a number of .js files and put them into the ”…”�”}”(hŒS. This will compile the autotests into a number of .js files and put them into the ”hj ubhI)�”}”(hŒ*__target__*”h]”hŒ
__target__”…”�”}”(hhhj1 ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒ^ subdirectory. Do NOT go to that directory (there’s no need, stay where you went at point 4)”…”�”}”(hŒ\ subdirectory. Do NOT go to that directory (there's no need, stay where you went at point 4)”hj ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjé hhhh+hNubhì)�”}”(hŒ¯From the command prompt run *transcrypt -r -c autotest*. This will run the autotests with CPython creating file *autotest.html* that refers to the generated *autotest.js* file”h]”h>)�”}”(hjR h]”(hŒFrom the command prompt run ”…”�”}”(hŒFrom the command prompt run ”hjT ubhI)�”}”(hŒ*transcrypt -r -c autotest*”h]”hŒtranscrypt -r -c autotest”…”�”}”(hhhj\ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjT ubhŒ9. This will run the autotests with CPython creating file ”…”�”}”(hŒ9. This will run the autotests with CPython creating file ”hjT ubhI)�”}”(hŒ*autotest.html*”h]”hŒ
autotest.html”…”�”}”(hhhjo ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjT ubhŒ that refers to the generated ”…”�”}”(hŒ that refers to the generated ”hjT ubhI)�”}”(hŒ
*autotest.js*”h]”hŒautotest.js”…”�”}”(hhhj‚ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjT ubhŒ file”…”�”}”(hŒ file”hjT ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjP ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjé hhhh+hNubhì)�”}”(hXO Start a http server from the command prompt by typing *python -m http.server*, or, dependent on your installation *python3 -m http.server*. In the address bar of your browser, type *localhost:8000/animals.html*. This will load the autotest, run it and compare the output with what was generated by CPython. It should report no errors
”h]”h>)�”}”(hXN Start a http server from the command prompt by typing *python -m http.server*, or, dependent on your installation *python3 -m http.server*. In the address bar of your browser, type *localhost:8000/animals.html*. This will load the autotest, run it and compare the output with what was generated by CPython. It should report no errors”h]”(hŒ7Start a http server from the command prompt by typing ”…”�”}”(hŒ7Start a http server from the command prompt by typing ”hj¥ ubhI)�”}”(hŒ*python -m http.server*”h]”hŒpython -m http.server”…”�”}”(hhhj® ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj¥ ubhŒ%, or, dependent on your installation ”…”�”}”(hŒ%, or, dependent on your installation ”hj¥ ubhI)�”}”(hŒ*python3 -m http.server*”h]”hŒpython3 -m http.server”…”�”}”(hhhjÁ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj¥ ubhŒ+. In the address bar of your browser, type ”…”�”}”(hŒ+. In the address bar of your browser, type ”hj¥ ubhI)�”}”(hŒ*localhost:8000/animals.html*”h]”hŒlocalhost:8000/animals.html”…”�”}”(hhhjÔ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj¥ ubhŒ{. This will load the autotest, run it and compare the output with what was generated by CPython. It should report no errors”…”�”}”(hŒ{. This will load the autotest, run it and compare the output with what was generated by CPython. It should report no errors”hj¥ ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhj¡ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjé hhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”j6 j7 j8 hj9 j: uh*hæhh,hhhh+hKubh>)�”}”(hŒ'To experiment with Transcrypt yourself:”h]”hŒ'To experiment with Transcrypt yourself:”…”�”}”(hjû hjù hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhh,hhubhç)�”}”(hhh]”(hì)�”}”(hŒ'Create a directory for your experiments”h]”h>)�”}”(hj h]”hŒ'Create a directory for your experiments”…”�”}”(hj hj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK!hj
ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj hhhh+hNubhì)�”}”(hŒ0Make your own thing there, e.g. *experiment1.py*”h]”h>)�”}”(hj# h]”(hŒ Make your own thing there, e.g. ”…”�”}”(hŒ Make your own thing there, e.g. ”hj% ubhI)�”}”(hŒ*experiment1.py*”h]”hŒexperiment1.py”…”�”}”(hhhj- ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj% ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK"hj! ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj hhhh+hNubhì)�”}”(hŒ(Compile with *transcrypt -b experiment1*”h]”h>)�”}”(hjI h]”(hŒ
Compile with ”…”�”}”(hŒ
Compile with ”hjK ubhI)�”}”(hŒ*transcrypt -b experiment1*”h]”hŒtranscrypt -b experiment1”…”�”}”(hhhjS ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjK ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK#hjG ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj hhhh+hNubhì)�”}”(hŒ†Make an HTML page that will load your code in the browser. Use the HTML file generated by the autotest as an example of how to do that”h]”h>)�”}”(hjo h]”hŒ†Make an HTML page that will load your code in the browser. Use the HTML file generated by the autotest as an example of how to do that”…”�”}”(hjo hjq ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK$hjm ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj hhhh+hNubhì)�”}”(hŒALoad and run the HTML + JS in the same way as indicated earlier.
”h]”h>)�”}”(hŒ@Load and run the HTML + JS in the same way as indicated earlier.”h]”hŒ@Load and run the HTML + JS in the same way as indicated earlier.”…”�”}”(hjŠ hjˆ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK%hj„ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj hhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”j6 j7 j8 hj9 j: uh*hæhh,hhhh+hK!ubh>)�”}”(hŒ$You may also want to try the demo's.”h]”hŒ&You may also want to try the demo’s.”…”�”}”(hj¤ hj¢ hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK'hh,hhubh)�”}”(hhh]”(h)�”}”(hŒ&Installation troubleshooting checklist”h]”hŒ&Installation troubleshooting checklist”…”�”}”(hjµ hj³ hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhj° hhhh+hK*ubhç)�”}”(hhh]”(hì)�”}”(hŒ Transcrypt was installed using *pip*, but *import transcrypt* fails. Transcrypt isn't a library but a compiler. Install and run it as described in this chapter.”h]”h>)�”}”(hjÆ h]”(hŒTranscrypt was installed using ”…”�”}”(hŒTranscrypt was installed using ”hjÈ ubhI)�”}”(hŒ*pip*”h]”hŒpip”…”�”}”(hhhjÐ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjÈ ubhŒ, but ”…”�”}”(hŒ, but ”hjÈ ubhI)�”}”(hŒ*import transcrypt*”h]”hŒimport transcrypt”…”�”}”(hhhjã ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjÈ ubhŒe fails. Transcrypt isn’t a library but a compiler. Install and run it as described in this chapter.”…”�”}”(hŒc fails. Transcrypt isn't a library but a compiler. Install and run it as described in this chapter.”hjÈ ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK,hjÄ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjÁ hhhh+hNubhì)�”}”(hX* Transcrypt reports an error containing the word 'java'. Transcrypt produces both prettyfied and minified JavaScript output. For the minification it makes use of the Google Closure Compiler, which is included in the distribution and requires Java to run. You can check proper installation of Java by typing the word *java* on the command line. This should give you a list of options: *Usage: java [-options] class []args...]* and so on. If you can't or won't install Java, you can run Transcrypt without minification by using the *-n* command line switch.”h]”h>)�”}”(hj h]”(hX? Transcrypt reports an error containing the word ‘java’. Transcrypt produces both prettyfied and minified JavaScript output. For the minification it makes use of the Google Closure Compiler, which is included in the distribution and requires Java to run. You can check proper installation of Java by typing the word ”…”�”}”(hX; Transcrypt reports an error containing the word 'java'. Transcrypt produces both prettyfied and minified JavaScript output. For the minification it makes use of the Google Closure Compiler, which is included in the distribution and requires Java to run. You can check proper installation of Java by typing the word ”hj ubhI)�”}”(hŒ*java*”h]”hŒjava”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒ> on the command line. This should give you a list of options: ”…”�”}”(hŒ> on the command line. This should give you a list of options: ”hj ubhI)�”}”(hŒ)*Usage: java [-options] class []args...]*”h]”hŒ'Usage: java [-options] class []args…]”…”�”}”(hhhj! ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒm and so on. If you can’t or won’t install Java, you can run Transcrypt without minification by using the ”…”�”}”(hŒi and so on. If you can't or won't install Java, you can run Transcrypt without minification by using the ”hj ubhI)�”}”(hŒ*-n*”h]”hŒ-n”…”�”}”(hhhj4 ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒ command line switch.”…”�”}”(hŒ command line switch.”hj ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK-hj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjÁ hhhh+hNubhì)�”}”(hX The static checker doesn't find all errors it could. The static checks, performed by the PyFlakes package that's part of the distribution, are of a 'light' variety. Style checks and false positives are avoided. The accent is on finding undefined identifiers and unused variables.
”h]”h>)�”}”(hX The static checker doesn't find all errors it could. The static checks, performed by the PyFlakes package that's part of the distribution, are of a 'light' variety. Style checks and false positives are avoided. The accent is on finding undefined identifiers and unused variables.”h]”hX The static checker doesn’t find all errors it could. The static checks, performed by the PyFlakes package that’s part of the distribution, are of a ‘light’ variety. Style checks and false positives are avoided. The accent is on finding undefined identifiers and unused variables.”…”�”}”(hjY hjW ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK.hjS ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjÁ hhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”j6 j7 j8 hj9 j: uh*hæhj° hhhh+hK,ubeh}”(h ]”Œ&installation-troubleshooting-checklist”ah"]”h$]”Œ&installation troubleshooting checklist”ah&]”h(]”uh*h
hh,hhhh+hK*ubeh}”(h ]”Œinstallation”ah"]”h$]”Œinstallation”ah&]”h(]”uh*h
hhhhhh+hKubh)�”}”(hhh]”(h)�”}”(hŒYour first Transcrypt program”h]”hŒYour first Transcrypt program”…”�”}”(hj† hj„ hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhj� hhhh+hK1ubh>)�”}”(hX9 Open a command prompt in the *demos/hello* directory and type *transcrypt hello*.
Then start a http server from the command prompt by typing *python -m http.server* or *python3 -m http.server*, dependent on your installation and type *localhost:8000/hello* in the address bar to load the result into your browser.”h]”(hŒOpen a command prompt in the ”…”�”}”(hŒOpen a command prompt in the ”hj’ hhhNhNubhI)�”}”(hŒ
*demos/hello*”h]”hŒdemos/hello”…”�”}”(hhhj› ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj’ ubhŒ directory and type ”…”�”}”(hŒ directory and type ”hj’ hhhNhNubhI)�”}”(hŒ*transcrypt hello*”h]”hŒtranscrypt hello”…”�”}”(hhhj® ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj’ ubhŒ=.
Then start a http server from the command prompt by typing ”…”�”}”(hŒ=.
Then start a http server from the command prompt by typing ”hj’ hhhNhNubhI)�”}”(hŒ*python -m http.server*”h]”hŒpython -m http.server”…”�”}”(hhhjÁ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj’ ubhŒ or ”…”�”}”(hŒ or ”hj’ hhhNhNubhI)�”}”(hŒ*python3 -m http.server*”h]”hŒpython3 -m http.server”…”�”}”(hhhjÔ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj’ ubhŒ*, dependent on your installation and type ”…”�”}”(hŒ*, dependent on your installation and type ”hj’ hhhNhNubhI)�”}”(hŒ*localhost:8000/hello*”h]”hŒlocalhost:8000/hello”…”�”}”(hhhjç ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj’ ubhŒ9 in the address bar to load the result into your browser.”…”�”}”(hŒ9 in the address bar to load the result into your browser.”hj’ hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK3hj� hhubh>)�”}”(hŒ¬After clicking on both buttons a few times, take a look at *hello.html*.
As you can see, eventhandlers are connected to the buttons exactly as you would do with JavaScript.”h]”(hŒ;After clicking on both buttons a few times, take a look at ”…”�”}”(hŒ;After clicking on both buttons a few times, take a look at ”hj hhhNhNubhI)�”}”(hŒ*hello.html*”h]”hŒ
hello.html”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubhŒe.
As you can see, eventhandlers are connected to the buttons exactly as you would do with JavaScript.”…”�”}”(hŒe.
As you can see, eventhandlers are connected to the buttons exactly as you would do with JavaScript.”hj hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK6hj� hhubh>)�”}”(hŒ´Then look at *hello.py*.
Note that JavaScript functions like document.getElementById can be called from Python exactly as you would call them from JavaScript, but with Python data.”h]”(hŒ
Then look at ”…”�”}”(hŒ
Then look at ”hj" hhhNhNubhI)�”}”(hŒ
*hello.py*”h]”hŒhello.py”…”�”}”(hhhj+ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj" ubhŒ�.
Note that JavaScript functions like document.getElementById can be called from Python exactly as you would call them from JavaScript, but with Python data.”…”�”}”(hŒ�.
Note that JavaScript functions like document.getElementById can be called from Python exactly as you would call them from JavaScript, but with Python data.”hj" hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK9hj� hhubh>)�”}”(hXž The minified JavaScript files *including the Transcrypt runtime* are only around 50kB. With non-trivial programs this overhead becomes negligible. Transcrypt applications in themselves don't need any external files. Of course you can use extensive JavaScript libraries served by content delivery networks as you normally would. But you can also make very compact stand alone applications. The most efficient thing to do is pack all functionality for a page in a single Transcrypt program. Note that the source can consist of many modules if needed and many callback entrypoints can be provided. But it is *one* stateful application, just like it would be on the desktop.”h]”(hŒThe minified JavaScript files ”…”�”}”(hŒThe minified JavaScript files ”hjD hhhNhNubhI)�”}”(hŒ"*including the Transcrypt runtime*”h]”hŒ including the Transcrypt runtime”…”�”}”(hhhjM ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjD ubhX are only around 50kB. With non-trivial programs this overhead becomes negligible. Transcrypt applications in themselves don’t need any external files. Of course you can use extensive JavaScript libraries served by content delivery networks as you normally would. But you can also make very compact stand alone applications. The most efficient thing to do is pack all functionality for a page in a single Transcrypt program. Note that the source can consist of many modules if needed and many callback entrypoints can be provided. But it is ”…”�”}”(hX are only around 50kB. With non-trivial programs this overhead becomes negligible. Transcrypt applications in themselves don't need any external files. Of course you can use extensive JavaScript libraries served by content delivery networks as you normally would. But you can also make very compact stand alone applications. The most efficient thing to do is pack all functionality for a page in a single Transcrypt program. Note that the source can consist of many modules if needed and many callback entrypoints can be provided. But it is ”hjD hhhNhNubhI)�”}”(hŒ*one*”h]”hŒone”…”�”}”(hhhj` ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjD ubhŒ< stateful application, just like it would be on the desktop.”…”�”}”(hŒ< stateful application, just like it would be on the desktop.”hjD hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK