€•Œ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”hhh hhhŒ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+hK hh,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 ”hjubhI)�”}”(hŒ$*../Transcrypt-/transcrypt*”h]”hŒ"../Transcrypt-/transcrypt”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ to your system path”…”�”}”(hŒ to your system path”hjubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjubah}”(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>)�”}”(hjMh]”(hŒCIf you install Transcrypt manually, Trancrypt is started by typing ”…”�”}”(hŒCIf you install Transcrypt manually, Trancrypt is started by typing ”hjOubhI)�”}”(hŒ*run_transcrypt*”h]”hŒrun_transcrypt”…”�”}”(hhhjWubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjOubhŒ rather than ”…”�”}”(hŒ rather than ”hjOubhI)�”}”(hŒ *transcrypt*”h]”hŒ transcrypt”…”�”}”(hhhjjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjOubhŒ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.”hjOubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjKubah}”(h ]”h"]”h$]”h&]”h(]”uh*jIhh,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*jIhh,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>)�”}”(hjh]”(hŒFrom the command prompt run ”…”�”}”(hŒFrom the command prompt run ”hjubhI)�”}”(hŒ*transcrypt -b -c -da autotest*”h]”hŒtranscrypt -b -c -da autotest”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ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 ”hjubhI)�”}”(hŒ *__target__*”h]”hŒ __target__”…”�”}”(hhhj1ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ^ 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)”hjubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjubah}”(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>)�”}”(hjRh]”(hŒFrom the command prompt run ”…”�”}”(hŒFrom the command prompt run ”hjTubhI)�”}”(hŒ*transcrypt -r -c autotest*”h]”hŒtranscrypt -r -c autotest”…”�”}”(hhhj\ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjTubhŒ9. This will run the autotests with CPython creating file ”…”�”}”(hŒ9. This will run the autotests with CPython creating file ”hjTubhI)�”}”(hŒ*autotest.html*”h]”hŒ autotest.html”…”�”}”(hhhjoubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjTubhŒ that refers to the generated ”…”�”}”(hŒ that refers to the generated ”hjTubhI)�”}”(hŒ *autotest.js*”h]”hŒ autotest.js”…”�”}”(hhhj‚ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjTubhŒ file”…”�”}”(hŒ file”hjTubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhjPubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjéhhhh+hNubhì)�”}”(hXOStart 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>)�”}”(hXNStart 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(]”j6j7j8hj9j: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 hjubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK!hj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjhhhh+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ëhjhhhh+hNubhì)�”}”(hŒ(Compile with *transcrypt -b experiment1*”h]”h>)�”}”(hjIh]”(hŒ Compile with ”…”�”}”(hŒ Compile with ”hjKubhI)�”}”(hŒ*transcrypt -b experiment1*”h]”hŒtranscrypt -b experiment1”…”�”}”(hhhjSubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjKubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK#hjGubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjhhhh+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>)�”}”(hjoh]”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”…”�”}”(hjohjqubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK$hjmubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjhhhh+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ëhjhhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”j6j7j8hj9j: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>)�”}”(hjh]”(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 ”hjubhI)�”}”(hŒ*java*”h]”hŒjava”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ> 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: ”hjubhI)�”}”(hŒ)*Usage: java [-options] class []args...]*”h]”hŒ'Usage: java [-options] class []args…]”…”�”}”(hhhj!ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ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 ”hjubhI)�”}”(hŒ*-n*”h]”hŒ-n”…”�”}”(hhhj4ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ command line switch.”…”�”}”(hŒ command line switch.”hjubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK-hjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjÁhhhh+hNubhì)�”}”(hXThe 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>)�”}”(hXThe 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]”hXThe 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.”…”�”}”(hjYhjWubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK.hjSubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhjÁhhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”j6j7j8hj9j: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 hh hhhh+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>)�”}”(hX9Open 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 ”hjhhhNhNubhI)�”}”(hŒ *hello.html*”h]”hŒ hello.html”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjubhŒ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.”hjhhhNhNubeh}”(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 ”hjDhhhNhNubhI)�”}”(hŒ"*including the Transcrypt runtime*”h]”hŒ including the Transcrypt runtime”…”�”}”(hhhjMubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjDubhX 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 ”hjDhhhNhNubhI)�”}”(hŒ*one*”h]”hŒone”…”�”}”(hhhj`ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjDubhŒ< stateful application, just like it would be on the desktop.”…”�”}”(hŒ< stateful application, just like it would be on the desktop.”hjDhhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhj{ubh Œ literal_block”“”)�”}”(hX]

Hello demo

...

...
”h]”hX]

Hello demo

...

...
”…”�”}”(hhhj�ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”ŒO/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/demos/hello/hello.html”Œ xml:space”Œpreserve”Œforce”‰Œhighlight_args”}”Œ linenostart”Ksuh*jŽhh+hK>hj{ubeh}”(h ]”Œid1”ah"]”Œliteral-block-wrapper”ah$]”h&]”h(]”Œ literal_block”ˆuh*jyhj�hhhhhNubjz)�”}”(hhh]”(j)�”}”(hŒrIn hello.py, JavaScript function document.getElementById is called directly from Python, using plain Python values”h]”hŒrIn hello.py, JavaScript function document.getElementById is called directly from Python, using plain Python values”…”�”}”(hj´hj²ubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hKBhj¯ubj�)�”}”(hXzfrom itertools import chain class SolarSystem: planets = [list (chain (planet, (index + 1,))) for index, planet in enumerate (( ('Mercury', 'hot', 2240), ('Venus', 'sulphurous', 6052), ('Earth', 'fertile', 6378), ('Mars', 'reddish', 3397), ('Jupiter', 'stormy', 71492), ('Saturn', 'ringed', 60268), ('Uranus', 'cold', 25559), ('Neptune', 'very cold', 24766) ))] lines = ( '{} is a {} planet', 'The radius of {} is {} km', '{} is planet nr. {} counting from the sun' ) def __init__ (self): self.lineIndex = 0 def greet (self): self.planet = self.planets [int (Math.random () * len (self.planets))] document.getElementById ('greet') .innerHTML = 'Hello {}'.format (self.planet [0]) self.explain () def explain (self): document.getElementById ('explain').innerHTML = ( self.lines [self.lineIndex] .format (self.planet [0], self.planet [self.lineIndex + 1]) ) self.lineIndex = (self.lineIndex + 1) % 3 solarSystem = SolarSystem () ”h]”hXzfrom itertools import chain class SolarSystem: planets = [list (chain (planet, (index + 1,))) for index, planet in enumerate (( ('Mercury', 'hot', 2240), ('Venus', 'sulphurous', 6052), ('Earth', 'fertile', 6378), ('Mars', 'reddish', 3397), ('Jupiter', 'stormy', 71492), ('Saturn', 'ringed', 60268), ('Uranus', 'cold', 25559), ('Neptune', 'very cold', 24766) ))] lines = ( '{} is a {} planet', 'The radius of {} is {} km', '{} is planet nr. {} counting from the sun' ) def __init__ (self): self.lineIndex = 0 def greet (self): self.planet = self.planets [int (Math.random () * len (self.planets))] document.getElementById ('greet') .innerHTML = 'Hello {}'.format (self.planet [0]) self.explain () def explain (self): document.getElementById ('explain').innerHTML = ( self.lines [self.lineIndex] .format (self.planet [0], self.planet [self.lineIndex + 1]) ) self.lineIndex = (self.lineIndex + 1) % 3 solarSystem = SolarSystem () ”…”�”}”(hhhjÀubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”ŒM/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/demos/hello/hello.py”j j¡j¢‰Œlinenos”ˆj£}”j¥Ksuh*jŽhh+hKBhj¯ubeh}”(h ]”Œid2”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhj�hhhhhNubhs)�”}”(hŒ.. _command_line_switches:”h]”h}”(h ]”h"]”h$]”h&]”h(]”Œrefid”Œcommand-line-switches”uh*hrhKGhj�hhhh+ubeh}”(h ]”Œyour-first-transcrypt-program”ah"]”h$]”Œyour first transcrypt program”ah&]”h(]”uh*h hh hhhh+hK1ubh )�”}”(hhh]”(h)�”}”(hŒAvailable command line switches”h]”hŒAvailable command line switches”…”�”}”(hjóhjñhhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjîhhhh+hKJubh>)�”}”(hŒ‹The available command line switches will be shown if you run transcrypt -h. They are specified in the source code of Transcrypt as follows:”h]”hŒ‹The available command line switches will be shown if you run transcrypt -h. They are specified in the source code of Transcrypt as follows:”…”�”}”(hjhjÿhhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKLhjîhhubjz)�”}”(hhh]”(j)�”}”(hŒPTranscrypt command line switches as specified in module/orgs/transcrypt/utils.py”h]”hŒPTranscrypt command line switches as specified in module/orgs/transcrypt/utils.py”…”�”}”(hjhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hKOhj ubj�)�”}”(hXñ&class CommandArgs: def parse (self): self.argParser = ArgumentParser () self.argParser.add_argument ('source', nargs='?', help = ".py file containing source code of main module") self.argParser.add_argument ('-a', '--anno', help = "annotate target files that were compiled from Python with source file names and source line numbers", action = 'store_true') self.argParser.add_argument ('-am', '--alimod', help = "use aliasing for module paths", action = 'store_true') self.argParser.add_argument ('-b', '--build', help = "rebuild all target files from scratch", action = 'store_true') self.argParser.add_argument ('-c', '--complex', help = "enable complex number support, locally requires operator overloading", action = 'store_true') self.argParser.add_argument ('-d', '--docat', help = "enable __doc__ attributes. Apply sparsely, since it will make docstrings part of the generated code", action = 'store_true') self.argParser.add_argument ('-da', '--dassert', help = "debug: activate assertions", action = 'store_true') self.argParser.add_argument ('-dc', '--dcheck', help = "debug: perform lightweight consistency check", action = 'store_true') self.argParser.add_argument ('-de', '--dextex', help = "debug: show extended exception reports", action = 'store_true') self.argParser.add_argument ('-dl', '--dlog', help = "debug: log compiler messages to disk", action = 'store_true') self.argParser.add_argument ('-dm', '--dmap', help = "debug: dump human readable source map", action = 'store_true') self.argParser.add_argument ('-dn', '--dnostrip', help = "debug: no comment stripping of __core__ and __builtin__ in-line modules", action = 'store_true') self.argParser.add_argument ('-ds', '--dstat', help = "debug: validate static typing using annotations", action = 'store_true') self.argParser.add_argument ('-dt', '--dtree', help = "debug: dump syntax tree", action = 'store_true') self.argParser.add_argument ('-e', '--esv', nargs='?', help = "ecma script version of generated code, default = 6. The symbol __esv__ is added to the global symbol list, e.g. __esv7__.") self.argParser.add_argument ('-ec', '--ecom', help = "enable executable comments, seen as comments by CPython but as executable statements by Transcrypt", action = 'store_true') self.argParser.add_argument ('-f', '--fcall', help = "enable fastcall mechanism by default. You can also use __pragma__ ('fcal') and __pragma__ (\'nofcall\')", action = 'store_true') self.argParser.add_argument ('-g', '--gen', help = "enable generators and iterators. Disadvised, since it will result in a function call for each loop iteration. Preferably use __pragma__ ('gen') and __pragma__ ('nogen')", action = 'store_true') self.argParser.add_argument ('-i', '--iconv', help = "enable automatic conversion to iterable by default. Disadvised, since it will result in a type check for each for-loop. Preferably use __pragma__ ('iconv') and __pragma__ (\'noiconv\') to enable automatic conversion locally", action = 'store_true') self.argParser.add_argument ('-jc', '--jscall', help = "enable native JavaScript calls for Python methods. This is fast, but doesn't support bound method assignment, decorators and non-instance methods. Preferably use __pragma__ ('jscall') and __pragma__ ('nojscall') to enable native JavaScript calls locally", action = 'store_true') self.argParser.add_argument ('-jk', '--jskeys', help = "interpret {key: 'value'} as {'key': 'value'} and forbid {key (): 'value'}, as JavaScript does. Disadvised, since it's less flexible than the Python interpretation. Either follow Python semantics by using {'key': 'value'} explicitly if you want literal keys or use __pragma__ ('jskeys') and __pragma__ ('nojskeys') locally instead to make clear local deviation from Python semantics", action = 'store_true') self.argParser.add_argument ('-jm', '--jsmod', help = "give %% and %%= JavaScript rather than Python behaviour. Disadvised, since it deviates from the mathematical 'modulo' operator. Either follow Python semantics or use __pragma__ ('jsmod') and __pragma__ ('nojsmod') locally instead to make clear local deviation.", action = 'store_true') self.argParser.add_argument ('-k', '--kwargs', help = "enable keyword arguments by default. In general this is disadvised, use __pragma__ ('kwargs') and __pragma__('nokwargs') locally instead to prevent bloated code", action = 'store_true') self.argParser.add_argument ('-kc', '--keycheck', help = "enable checking for existence of dictionary keys. In general this is disadvised, use __pragma__ ('keycheck') and __pragma__('nokeycheck') locally instead to prevent bloated code", action = 'store_true') self.argParser.add_argument ('-l', '--license', help = "show license", action = 'store_true') self.argParser.add_argument ('-m', '--map', help = "generate source map", action = 'store_true') self.argParser.add_argument ('-n', '--nomin', help = "no minification", action = 'store_true') self.argParser.add_argument ('-o', '--opov', help = "enable operator overloading by default. In general this is disadvised, use __pragma__ ('opov') and __pragma__('noopov') locally instead to prevent slow code", action = 'store_true') self.argParser.add_argument ('-od', '--outdir', help = 'override output directory (default = __target__)') self.argParser.add_argument ('-p', '--parent', nargs = '?', help = "object that will hold application, default is window. Use -p .none to generate orphan application, e.g. for use in node.js") self.argParser.add_argument ('-r', '--run', help = "run source file rather than compiling it", action = 'store_true') self.argParser.add_argument ('-s', '--symbols', nargs ='?', help = "names, joined by $, separately passed to main module in __symbols__ variable") self.argParser.add_argument ('-sf', '--sform', help = "enable support for string formatting mini language", action = 'store_true') self.argParser.add_argument ('-t', '--tconv', help = "enable automatic conversion to truth value by default. Disadvised, since it will result in a conversion for each boolean. Preferably use __pragma__ ('tconv') and __pragma__ (\'notconv\') to enable automatic conversion locally", action = 'store_true') self.argParser.add_argument ('-u', '--unit', nargs='?', help = "compile to units rather than to monolithic application. Use -u .auto to autogenerate dynamically loadable native JavaScript modules, one per Python module. Use -u .run to generate the loader and the staticcally loadable runtime unit. Use -u .com to generate a statically loadable component unit.") self.argParser.add_argument ('-v', '--verbose', help = "show all messages", action = 'store_true') self.argParser.add_argument ('-x', '--x', help = "reserved for extended options") self.argParser.add_argument ('-xr', '--xreex', help = "re-export all imported names", action = 'store_true') self.argParser.add_argument ('-xg', '--xglobs', help = "allow use of the 'globals' function", action = 'store_true') self.argParser.add_argument ('-xp', '--xpath', nargs = '?', help = "additional module search paths, joined by $, #'s will be replaced by spaces") self.argParser.add_argument ('-xt', '--xtiny', help = "generate tiny version of runtime, a.o. lacking support for implicit and explicit operator overloading. Use only if generated code can be validated, since it will introduce semantic alterations in edge cases", action = 'store_true') self.argParser.add_argument ('-*', '--star', help = "Like it? Grow it! Go to GitHub and then click [* Star]", action = 'store_true') self.projectOptions = self.argParser.parse_args () .__dict__ self.__dict__.update (self.projectOptions) # Signal invalid switches def logAndExit (message): log (True, message) sys.exit (1) invalidCombi = 'Invalid combination of options' if not (self.license or self.star or self.source): logAndExit (self.argParser.format_usage () .capitalize ()) elif self.map and self.unit: logAndExit ('{}: -m / --map and -u / --unit'.format (invalidCombi)) elif self.parent and self.unit == '.com': logAndExit ('{}: -p / --parent and -u / --unit .com'.format (invalidCombi)) elif self.parent == '.export' and self.esv and int (self.esv) < 6: logAndExit ('{}: -p / --parent .export and -e / --esv < 6'.format (invalidCombi)) elif self.unit == '.auto' and self.esv and int (self.esv) < 6: logAndExit ('{}: -u / --unit .auto and -e / --esv < 6'.format (invalidCombi)) # Set dependent switches # (for future use) # Correcting line counts for source map global extraLines extraLines = [ # Make identifier __pragma__ known to static checker # It was only known in JavaScript from __core__.js, which the checker doesn't see # __ pragma__ ('') in JavaScript requires it to remain a function, as it was in the core # It can't be skipped, since it has to precede __pragma__ ('skip'), to make the checker accept that 'def __pragma__ (): pass', # Make __include__ known to the static checker '__pragma__ (\'skip\')', '__new__ = __include__ = 0', '__pragma__ (\'noskip\')', '' ] if commandArgs.dcheck else [] global nrOfExtraLines nrOfExtraLines = max (len (extraLines) - 1, 0) # Last line only serves to force linefeed extraLines = '\n'.join (extraLines) ”h]”hXñ&class CommandArgs: def parse (self): self.argParser = ArgumentParser () self.argParser.add_argument ('source', nargs='?', help = ".py file containing source code of main module") self.argParser.add_argument ('-a', '--anno', help = "annotate target files that were compiled from Python with source file names and source line numbers", action = 'store_true') self.argParser.add_argument ('-am', '--alimod', help = "use aliasing for module paths", action = 'store_true') self.argParser.add_argument ('-b', '--build', help = "rebuild all target files from scratch", action = 'store_true') self.argParser.add_argument ('-c', '--complex', help = "enable complex number support, locally requires operator overloading", action = 'store_true') self.argParser.add_argument ('-d', '--docat', help = "enable __doc__ attributes. Apply sparsely, since it will make docstrings part of the generated code", action = 'store_true') self.argParser.add_argument ('-da', '--dassert', help = "debug: activate assertions", action = 'store_true') self.argParser.add_argument ('-dc', '--dcheck', help = "debug: perform lightweight consistency check", action = 'store_true') self.argParser.add_argument ('-de', '--dextex', help = "debug: show extended exception reports", action = 'store_true') self.argParser.add_argument ('-dl', '--dlog', help = "debug: log compiler messages to disk", action = 'store_true') self.argParser.add_argument ('-dm', '--dmap', help = "debug: dump human readable source map", action = 'store_true') self.argParser.add_argument ('-dn', '--dnostrip', help = "debug: no comment stripping of __core__ and __builtin__ in-line modules", action = 'store_true') self.argParser.add_argument ('-ds', '--dstat', help = "debug: validate static typing using annotations", action = 'store_true') self.argParser.add_argument ('-dt', '--dtree', help = "debug: dump syntax tree", action = 'store_true') self.argParser.add_argument ('-e', '--esv', nargs='?', help = "ecma script version of generated code, default = 6. The symbol __esv__ is added to the global symbol list, e.g. __esv7__.") self.argParser.add_argument ('-ec', '--ecom', help = "enable executable comments, seen as comments by CPython but as executable statements by Transcrypt", action = 'store_true') self.argParser.add_argument ('-f', '--fcall', help = "enable fastcall mechanism by default. You can also use __pragma__ ('fcal') and __pragma__ (\'nofcall\')", action = 'store_true') self.argParser.add_argument ('-g', '--gen', help = "enable generators and iterators. Disadvised, since it will result in a function call for each loop iteration. Preferably use __pragma__ ('gen') and __pragma__ ('nogen')", action = 'store_true') self.argParser.add_argument ('-i', '--iconv', help = "enable automatic conversion to iterable by default. Disadvised, since it will result in a type check for each for-loop. Preferably use __pragma__ ('iconv') and __pragma__ (\'noiconv\') to enable automatic conversion locally", action = 'store_true') self.argParser.add_argument ('-jc', '--jscall', help = "enable native JavaScript calls for Python methods. This is fast, but doesn't support bound method assignment, decorators and non-instance methods. Preferably use __pragma__ ('jscall') and __pragma__ ('nojscall') to enable native JavaScript calls locally", action = 'store_true') self.argParser.add_argument ('-jk', '--jskeys', help = "interpret {key: 'value'} as {'key': 'value'} and forbid {key (): 'value'}, as JavaScript does. Disadvised, since it's less flexible than the Python interpretation. Either follow Python semantics by using {'key': 'value'} explicitly if you want literal keys or use __pragma__ ('jskeys') and __pragma__ ('nojskeys') locally instead to make clear local deviation from Python semantics", action = 'store_true') self.argParser.add_argument ('-jm', '--jsmod', help = "give %% and %%= JavaScript rather than Python behaviour. Disadvised, since it deviates from the mathematical 'modulo' operator. Either follow Python semantics or use __pragma__ ('jsmod') and __pragma__ ('nojsmod') locally instead to make clear local deviation.", action = 'store_true') self.argParser.add_argument ('-k', '--kwargs', help = "enable keyword arguments by default. In general this is disadvised, use __pragma__ ('kwargs') and __pragma__('nokwargs') locally instead to prevent bloated code", action = 'store_true') self.argParser.add_argument ('-kc', '--keycheck', help = "enable checking for existence of dictionary keys. In general this is disadvised, use __pragma__ ('keycheck') and __pragma__('nokeycheck') locally instead to prevent bloated code", action = 'store_true') self.argParser.add_argument ('-l', '--license', help = "show license", action = 'store_true') self.argParser.add_argument ('-m', '--map', help = "generate source map", action = 'store_true') self.argParser.add_argument ('-n', '--nomin', help = "no minification", action = 'store_true') self.argParser.add_argument ('-o', '--opov', help = "enable operator overloading by default. In general this is disadvised, use __pragma__ ('opov') and __pragma__('noopov') locally instead to prevent slow code", action = 'store_true') self.argParser.add_argument ('-od', '--outdir', help = 'override output directory (default = __target__)') self.argParser.add_argument ('-p', '--parent', nargs = '?', help = "object that will hold application, default is window. Use -p .none to generate orphan application, e.g. for use in node.js") self.argParser.add_argument ('-r', '--run', help = "run source file rather than compiling it", action = 'store_true') self.argParser.add_argument ('-s', '--symbols', nargs ='?', help = "names, joined by $, separately passed to main module in __symbols__ variable") self.argParser.add_argument ('-sf', '--sform', help = "enable support for string formatting mini language", action = 'store_true') self.argParser.add_argument ('-t', '--tconv', help = "enable automatic conversion to truth value by default. Disadvised, since it will result in a conversion for each boolean. Preferably use __pragma__ ('tconv') and __pragma__ (\'notconv\') to enable automatic conversion locally", action = 'store_true') self.argParser.add_argument ('-u', '--unit', nargs='?', help = "compile to units rather than to monolithic application. Use -u .auto to autogenerate dynamically loadable native JavaScript modules, one per Python module. Use -u .run to generate the loader and the staticcally loadable runtime unit. Use -u .com to generate a statically loadable component unit.") self.argParser.add_argument ('-v', '--verbose', help = "show all messages", action = 'store_true') self.argParser.add_argument ('-x', '--x', help = "reserved for extended options") self.argParser.add_argument ('-xr', '--xreex', help = "re-export all imported names", action = 'store_true') self.argParser.add_argument ('-xg', '--xglobs', help = "allow use of the 'globals' function", action = 'store_true') self.argParser.add_argument ('-xp', '--xpath', nargs = '?', help = "additional module search paths, joined by $, #'s will be replaced by spaces") self.argParser.add_argument ('-xt', '--xtiny', help = "generate tiny version of runtime, a.o. lacking support for implicit and explicit operator overloading. Use only if generated code can be validated, since it will introduce semantic alterations in edge cases", action = 'store_true') self.argParser.add_argument ('-*', '--star', help = "Like it? Grow it! Go to GitHub and then click [* Star]", action = 'store_true') self.projectOptions = self.argParser.parse_args () .__dict__ self.__dict__.update (self.projectOptions) # Signal invalid switches def logAndExit (message): log (True, message) sys.exit (1) invalidCombi = 'Invalid combination of options' if not (self.license or self.star or self.source): logAndExit (self.argParser.format_usage () .capitalize ()) elif self.map and self.unit: logAndExit ('{}: -m / --map and -u / --unit'.format (invalidCombi)) elif self.parent and self.unit == '.com': logAndExit ('{}: -p / --parent and -u / --unit .com'.format (invalidCombi)) elif self.parent == '.export' and self.esv and int (self.esv) < 6: logAndExit ('{}: -p / --parent .export and -e / --esv < 6'.format (invalidCombi)) elif self.unit == '.auto' and self.esv and int (self.esv) < 6: logAndExit ('{}: -u / --unit .auto and -e / --esv < 6'.format (invalidCombi)) # Set dependent switches # (for future use) # Correcting line counts for source map global extraLines extraLines = [ # Make identifier __pragma__ known to static checker # It was only known in JavaScript from __core__.js, which the checker doesn't see # __ pragma__ ('') in JavaScript requires it to remain a function, as it was in the core # It can't be skipped, since it has to precede __pragma__ ('skip'), to make the checker accept that 'def __pragma__ (): pass', # Make __include__ known to the static checker '__pragma__ (\'skip\')', '__new__ = __include__ = 0', '__pragma__ (\'noskip\')', '' ] if commandArgs.dcheck else [] global nrOfExtraLines nrOfExtraLines = max (len (extraLines) - 1, 0) # Last line only serves to force linefeed extraLines = '\n'.join (extraLines) ”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”ŒX/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/org/transcrypt/utils.py”j j¡j¢‰j£}”j¥Ksuh*jŽhh+hKOhj ubeh}”(h ]”Œid3”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjîhhhhhNubh>)�”}”(hXqIf static checking is enabled, insert dummy definitions of global JavaScript variables between :ref:`__pragma__ ('skip') and __pragma__ ('noskip') ` to prevent needless complaints of the checker. The static checks are geared towards avoiding false alarms, and mainly check undefined names and unused variables. Style checks are deliberately avoided.”h]”(hŒ_If static checking is enabled, insert dummy definitions of global JavaScript variables between ”…”�”}”(hŒ_If static checking is enabled, insert dummy definitions of global JavaScript variables between ”hj7hhhNhNubhŒ pending_xref”“”)�”}”(hŒI:ref:`__pragma__ ('skip') and __pragma__ ('noskip') `”h]”h Œinline”“”)�”}”(hjDh]”hŒ5__pragma__ (‘skip’) and __pragma__ (‘noskip’)”…”�”}”(hhhjHubah}”(h ]”h"]”(Œxref”Œstd”Œstd-ref”eh$]”h&]”h(]”uh*jFhjBubah}”(h ]”h"]”h$]”h&]”h(]”Œrefdoc”Œinstallation_use”Œ refdomain”jSŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œskipping_fragments”uh*j@hh+hKThj7ubhŒÉ to prevent needless complaints of the checker. The static checks are geared towards avoiding false alarms, and mainly check undefined names and unused variables. Style checks are deliberately avoided.”…”�”}”(hŒÉ to prevent needless complaints of the checker. The static checks are geared towards avoiding false alarms, and mainly check undefined names and unused variables. Style checks are deliberately avoided.”hj7hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKThjîhhubeh}”(h ]”(Œavailable-command-line-switches”jåeh"]”h$]”(Œavailable command line switches”Œcommand_line_switches”eh&]”h(]”uh*h hh hhhh+hKJŒexpect_referenced_by_name”}”jxjÚsŒexpect_referenced_by_id”}”jåjÚsubh )�”}”(hhh]”(h)�”}”(hŒCompiling to JavaScript 6”h]”hŒCompiling to JavaScript 6”…”�”}”(hj„hj‚hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjhhhh+hKWubh>)�”}”(hX`Transcrypt generates JavaScript 6, that is by default minimized by the Google Closure compiler. Since multilevel sourcemaps are provided, the minified code can be easily debugged, because it directly links back to the original Python sourcecode. Using the *-n* command line switch turns off minification and results in human readable JavaScript output.”h]”(hXTranscrypt generates JavaScript 6, that is by default minimized by the Google Closure compiler. Since multilevel sourcemaps are provided, the minified code can be easily debugged, because it directly links back to the original Python sourcecode. Using the ”…”�”}”(hXTranscrypt generates JavaScript 6, that is by default minimized by the Google Closure compiler. Since multilevel sourcemaps are provided, the minified code can be easily debugged, because it directly links back to the original Python sourcecode. Using the ”hj�hhhNhNubhI)�”}”(hŒ*-n*”h]”hŒ-n”…”�”}”(hhhj™ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj�ubhŒ\ command line switch turns off minification and results in human readable JavaScript output.”…”�”}”(hŒ\ command line switch turns off minification and results in human readable JavaScript output.”hj�hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKYhjhhubeh}”(h ]”Œcompiling-to-javascript-6”ah"]”h$]”Œcompiling to javascript 6”ah&]”h(]”uh*h hh hhhh+hKWubh )�”}”(hhh]”(h)�”}”(hŒCompiling for node.js”h]”hŒCompiling for node.js”…”�”}”(hj¿hj½hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjºhhhh+hK\ubh>)�”}”(hX6Transcrypt will allow you to target *node.js* while writing your server code in Python. This opens up the exploding world of node.js libraries from your favorite programming language. In the *demo/nodejs_demo* subdirectory of the installation, you'll find the following trivial example of a node.js server app:”h]”(hŒ$Transcrypt will allow you to target ”…”�”}”(hŒ$Transcrypt will allow you to target ”hjËhhhNhNubhI)�”}”(hŒ *node.js*”h]”hŒnode.js”…”�”}”(hhhjÔubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjËubhŒ’ while writing your server code in Python. This opens up the exploding world of node.js libraries from your favorite programming language. In the ”…”�”}”(hŒ’ while writing your server code in Python. This opens up the exploding world of node.js libraries from your favorite programming language. In the ”hjËhhhNhNubhI)�”}”(hŒ*demo/nodejs_demo*”h]”hŒdemo/nodejs_demo”…”�”}”(hhhjçubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjËubhŒg subdirectory of the installation, you’ll find the following trivial example of a node.js server app:”…”�”}”(hŒe subdirectory of the installation, you'll find the following trivial example of a node.js server app:”hjËhhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK^hjºhhubjz)�”}”(hhh]”(j)�”}”(hŒlUsing node.js from Transcrypt is trivial, including the use of 'require' to tap into a vast set of libraries”h]”hŒpUsing node.js from Transcrypt is trivial, including the use of ‘require’ to tap into a vast set of libraries”…”�”}”(hjhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hKbhjubj�)�”}”(hX¨# Compile with p. command line switch (see docs). import time http = require ('http') class Demo: texts = ( 'Welcome to the world of node.js', 'You can have your cake and eat it', 'Use node\'s ecosystem while programming in Python', 'Using node.js from Transcrypt is easy', 'Take a Python ride into the node.js world' ) def __init__ (self, port): print ('Demo server started on port', port) self.server = http.createServer (self.serve) self.server.listen (port) self.oldIndex = 0 self.newIndex = 0 self.count = 0 def serve (self, request, response): time.__adapt__ (request) response.writeHead (200) print ('Serving page', self.count) self.count += 1 while self.newIndex == self.oldIndex: self.newIndex = int (Math.random () * len (self.texts)) self.oldIndex = self.newIndex response.end ('

{}

{}

'.format ( self.texts [self.newIndex], time.localtime () )) demo = Demo (process.argv [2]) #This is where node puts its command line params ”h]”hX¨# Compile with p. command line switch (see docs). import time http = require ('http') class Demo: texts = ( 'Welcome to the world of node.js', 'You can have your cake and eat it', 'Use node\'s ecosystem while programming in Python', 'Using node.js from Transcrypt is easy', 'Take a Python ride into the node.js world' ) def __init__ (self, port): print ('Demo server started on port', port) self.server = http.createServer (self.serve) self.server.listen (port) self.oldIndex = 0 self.newIndex = 0 self.count = 0 def serve (self, request, response): time.__adapt__ (request) response.writeHead (200) print ('Serving page', self.count) self.count += 1 while self.newIndex == self.oldIndex: self.newIndex = int (Math.random () * len (self.texts)) self.oldIndex = self.newIndex response.end ('

{}

{}

'.format ( self.texts [self.newIndex], time.localtime () )) demo = Demo (process.argv [2]) #This is where node puts its command line params ”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”ŒY/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/demos/nodejs_demo/nodejs_demo.py”j j¡j¢‰j£}”j¥Ksuh*jŽhh+hKbhjubeh}”(h ]”Œid4”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjºhhhhhNubh>)�”}”(hŒ(Follow the steps below to run this demo:”h]”hŒ(Follow the steps below to run this demo:”…”�”}”(hj,hj*hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKfhjºhhubh Œ bullet_list”“”)�”}”(hhh]”(hì)�”}”(hŒ)Install node.js from *https://nodejs.org*”h]”h>)�”}”(hj?h]”(hŒInstall node.js from ”…”�”}”(hŒInstall node.js from ”hjAubhI)�”}”(hŒ*https://nodejs.org*”h]”hŒhttps://nodejs.org”…”�”}”(hhhjIubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjAubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKhhj=ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒOpen a node.js command prompt”h]”h>)�”}”(hjeh]”hŒOpen a node.js command prompt”…”�”}”(hjehjgubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKihjcubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒ&Go to the *demo/nodejs_demo* directory”h]”h>)�”}”(hj|h]”(hŒ Go to the ”…”�”}”(hŒ Go to the ”hj~ubhI)�”}”(hŒ*demo/nodejs_demo*”h]”hŒdemo/nodejs_demo”…”�”}”(hhhj†ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj~ubhŒ directory”…”�”}”(hŒ directory”hj~ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKjhjzubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒxCompile the demo with *transcrypt -b -p .none nodejs_demo*, to generate an orphan module rather than a child of *window*”h]”h>)�”}”(hj§h]”(hŒCompile the demo with ”…”�”}”(hŒCompile the demo with ”hj©ubhI)�”}”(hŒ$*transcrypt -b -p .none nodejs_demo*”h]”hŒ"transcrypt -b -p .none nodejs_demo”…”�”}”(hhhj±ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj©ubhŒ6, to generate an orphan module rather than a child of ”…”�”}”(hŒ6, to generate an orphan module rather than a child of ”hj©ubhI)�”}”(hŒ*window*”h]”hŒwindow”…”�”}”(hhhjÄubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj©ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKkhj¥ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒ-Go to *demo/nodejs_demo/__target__* directory”h]”h>)�”}”(hjàh]”(hŒGo to ”…”�”}”(hŒGo to ”hjâubhI)�”}”(hŒ*demo/nodejs_demo/__target__*”h]”hŒdemo/nodejs_demo/__target__”…”�”}”(hhhjêubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjâubhŒ directory”…”�”}”(hŒ directory”hjâubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKlhjÞubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒType *node nodejs_demo.js*”h]”h>)�”}”(hj h]”(hŒType ”…”�”}”(hŒType ”hj ubhI)�”}”(hŒ*node nodejs_demo.js*”h]”hŒnode nodejs_demo.js”…”�”}”(hhhjubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKmhj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒ;In your browser, view the result at *http://localhost:8080*”h]”h>)�”}”(hj1h]”(hŒ$In your browser, view the result at ”…”�”}”(hŒ$In your browser, view the result at ”hj3ubhI)�”}”(hŒ*http://localhost:8080*”h]”hŒhttp://localhost:8080”…”�”}”(hhhj;ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhj3ubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKnhj/ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubhì)�”}”(hŒ\Repeatedly reload the page to see the text change (Google Chrome may actually reload twice) ”h]”h>)�”}”(hŒ[Repeatedly reload the page to see the text change (Google Chrome may actually reload twice)”h]”hŒ[Repeatedly reload the page to see the text change (Google Chrome may actually reload twice)”…”�”}”(hj[hjYubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKohjUubah}”(h ]”h"]”h$]”h&]”h(]”uh*hëhj:hhhh+hNubeh}”(h ]”h"]”h$]”h&]”h(]”Œbullet”Œ-”uh*j8hh+hKhhjºhhubeh}”(h ]”Œcompiling-for-node-js”ah"]”h$]”Œcompiling for node.js”ah&]”h(]”uh*h hh hhhh+hK\ubh )�”}”(hhh]”(h)�”}”(hŒ*Using sourcemaps and annotated target code”h]”hŒ*Using sourcemaps and annotated target code”…”�”}”(hj‚hj€hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhj}hhhh+hKrubh )�”}”(hhh]”(h)�”}”(hŒ Sourcemaps”h]”hŒ Sourcemaps”…”�”}”(hj“hj‘hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjŽhhhh+hKuubh>)�”}”(hX[Sourcemaps enable debugging from the original Python source code rather then from the generated JavaScript. Transcrypt supports the use of single- and multi-level sourcemaps, using the *-m* switch. This means that you can source-level debug both non-minified and minified JavaScript target code. Sourcemaps are routinely tested for Google Chrome only, both under Windows and Linux, but they also have been observed to work for Firefox. Combined with the high readability of the JavaScript code generated by Transcrypt, this enables efficient debugging for real-world projects consisting of many modules.”h]”(hŒ¹Sourcemaps enable debugging from the original Python source code rather then from the generated JavaScript. Transcrypt supports the use of single- and multi-level sourcemaps, using the ”…”�”}”(hŒ¹Sourcemaps enable debugging from the original Python source code rather then from the generated JavaScript. Transcrypt supports the use of single- and multi-level sourcemaps, using the ”hjŸhhhNhNubhI)�”}”(hŒ*-m*”h]”hŒ-m”…”�”}”(hhhj¨ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjŸubhXž switch. This means that you can source-level debug both non-minified and minified JavaScript target code. Sourcemaps are routinely tested for Google Chrome only, both under Windows and Linux, but they also have been observed to work for Firefox. Combined with the high readability of the JavaScript code generated by Transcrypt, this enables efficient debugging for real-world projects consisting of many modules.”…”�”}”(hXž switch. This means that you can source-level debug both non-minified and minified JavaScript target code. Sourcemaps are routinely tested for Google Chrome only, both under Windows and Linux, but they also have been observed to work for Firefox. Combined with the high readability of the JavaScript code generated by Transcrypt, this enables efficient debugging for real-world projects consisting of many modules.”hjŸhhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKvhjŽhhubeh}”(h ]”Œ sourcemaps”ah"]”h$]”Œ sourcemaps”ah&]”h(]”uh*h hj}hhhh+hKuubh )�”}”(hhh]”(h)�”}”(hŒAnnotated target code”h]”hŒAnnotated target code”…”�”}”(hjÎhjÌhhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjÉhhhh+hKyubh>)�”}”(hXKIn addition to generating sourcemaps, you can use the *-a* switch to annotate non-minified JavaScript files with comments, referring to the original Python file names and line numbers. So even if your browser doesn't support sourcemaps, it's easy to find back the original Python source code location from any JavaScript statement.”h]”(hŒ6In addition to generating sourcemaps, you can use the ”…”�”}”(hŒ6In addition to generating sourcemaps, you can use the ”hjÚhhhNhNubhI)�”}”(hŒ*-a*”h]”•æxhŒ-a”…”�”}”(hhhjãubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjÚubhX switch to annotate non-minified JavaScript files with comments, referring to the original Python file names and line numbers. So even if your browser doesn’t support sourcemaps, it’s easy to find back the original Python source code location from any JavaScript statement.”…”�”}”(hX switch to annotate non-minified JavaScript files with comments, referring to the original Python file names and line numbers. So even if your browser doesn't support sourcemaps, it's easy to find back the original Python source code location from any JavaScript statement.”hjÚhhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hKzhjÉhhubjz)�”}”(hhh]”(j)�”}”(hŒ"Annotated target code for hello.py”h]”hŒ"Annotated target code for hello.py”…”�”}”(hj hjÿubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hK|hjüubj�)�”}”(hXU // ============ Source: D:/activ_tosh/geatec/transcrypt/transcrypt/demos/hello/hello.py ============ /* 000001 */ (function () { /* 000001 */ var chain = __init__ (__world__.itertools).chain; /* 000003 */ var SolarSystem = __class__ ('SolarSystem', [object], { /* 000021 */ get __init__ () {return __get__ (this, function (self) { /* 000022 */ self.lineIndex = 0; /* 000022 */ });}, /* 000024 */ get greet () {return __get__ (this, function (self) { /* 000025 */ self.planet = self.planets [int (Math.random () * len (self.planets))]; /* 000026 */ document.getElementById ('greet').innerHTML = 'Hello {}'.format (self.planet [0]); /* 000027 */ self.explain (); /* 000027 */ });}, /* 000029 */ get explain () {return __get__ (this, function (self) { /* 000031 */ document.getElementById ('explain').innerHTML = self.lines [self.lineIndex].format (self.planet [0], self.planet [self.lineIndex + 1]); /* 000033 */ self.lineIndex = (self.lineIndex + 1) % 3; /* 000033 */ });} /* 000033 */ }); /* 000004 */ SolarSystem.planets = function () { /* 000004 */ var __accu0__ = []; /* 000004 */ var __iter0__ = enumerate (tuple ([tuple (['Mercury', 'hot', 2240]), tuple (['Venus', 'sulphurous', 6052]), tuple (['Earth', 'fertile', 6378]), tuple (['Mars', 'reddish', 3397]), tuple (['Jupiter', 'stormy', 71492]), tuple (['Saturn', 'ringed', 60268]), tuple (['Uranus', 'cold', 25559]), tuple (['Neptune', 'very cold', 24766])])); /* 000004 */ for (var __index0__ = 0; __index0__ < __iter0__.length; __index0__++) { /* 000012 */ var __left0__ = __iter0__ [__index0__]; /* 000012 */ var index = __left0__ [0]; /* 000012 */ var planet = __left0__ [1]; /* 000004 */ __accu0__.append (chain (planet, tuple ([index + 1]))); /* 000004 */ } /* 000004 */ return __accu0__; /* 000004 */ } (); /* 000015 */ SolarSystem.lines = tuple (['{} is a {} planet', 'The radius of {} is {} km', '{} is planet nr. {} counting from the sun']); /* 000035 */ var solarSystem = SolarSystem (); /* 000035 */ __pragma__ ('' + /* 000035 */ 'itertools' + /* 000035 */ '') /* 000035 */ __pragma__ ('') /* 000035 */ __all__.SolarSystem = SolarSystem; /* 000035 */ __all__.solarSystem = solarSystem; /* 000035 */ __pragma__ ('') /* 000035 */ }) (); /* 000035 */ return __all__; ”h]”hXU // ============ Source: D:/activ_tosh/geatec/transcrypt/transcrypt/demos/hello/hello.py ============ /* 000001 */ (function () { /* 000001 */ var chain = __init__ (__world__.itertools).chain; /* 000003 */ var SolarSystem = __class__ ('SolarSystem', [object], { /* 000021 */ get __init__ () {return __get__ (this, function (self) { /* 000022 */ self.lineIndex = 0; /* 000022 */ });}, /* 000024 */ get greet () {return __get__ (this, function (self) { /* 000025 */ self.planet = self.planets [int (Math.random () * len (self.planets))]; /* 000026 */ document.getElementById ('greet').innerHTML = 'Hello {}'.format (self.planet [0]); /* 000027 */ self.explain (); /* 000027 */ });}, /* 000029 */ get explain () {return __get__ (this, function (self) { /* 000031 */ document.getElementById ('explain').innerHTML = self.lines [self.lineIndex].format (self.planet [0], self.planet [self.lineIndex + 1]); /* 000033 */ self.lineIndex = (self.lineIndex + 1) % 3; /* 000033 */ });} /* 000033 */ }); /* 000004 */ SolarSystem.planets = function () { /* 000004 */ var __accu0__ = []; /* 000004 */ var __iter0__ = enumerate (tuple ([tuple (['Mercury', 'hot', 2240]), tuple (['Venus', 'sulphurous', 6052]), tuple (['Earth', 'fertile', 6378]), tuple (['Mars', 'reddish', 3397]), tuple (['Jupiter', 'stormy', 71492]), tuple (['Saturn', 'ringed', 60268]), tuple (['Uranus', 'cold', 25559]), tuple (['Neptune', 'very cold', 24766])])); /* 000004 */ for (var __index0__ = 0; __index0__ < __iter0__.length; __index0__++) { /* 000012 */ var __left0__ = __iter0__ [__index0__]; /* 000012 */ var index = __left0__ [0]; /* 000012 */ var planet = __left0__ [1]; /* 000004 */ __accu0__.append (chain (planet, tuple ([index + 1]))); /* 000004 */ } /* 000004 */ return __accu0__; /* 000004 */ } (); /* 000015 */ SolarSystem.lines = tuple (['{} is a {} planet', 'The radius of {} is {} km', '{} is planet nr. {} counting from the sun']); /* 000035 */ var solarSystem = SolarSystem (); /* 000035 */ __pragma__ ('' + /* 000035 */ 'itertools' + /* 000035 */ '') /* 000035 */ __pragma__ ('') /* 000035 */ __all__.SolarSystem = SolarSystem; /* 000035 */ __all__.solarSystem = solarSystem; /* 000035 */ __pragma__ ('') /* 000035 */ }) (); /* 000035 */ return __all__; ”…”�”}”(hhhj ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”ŒP/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/docs/code/hello_anno.js”j j¡j¢‰j£}”j¥Ksuh*jŽhh+hK|hjüubeh}”(h ]”Œid5”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjÉhhhhhNubh>)�”}”(hŒ­Source code annotation only happens for Python sources, not for JavaScript-only modules, that have a trivial correspondence between non-minified target code and source code.”h]”hŒ­Source code annotation only happens for Python sources, not for JavaScript-only modules, that have a trivial correspondence between non-minified target code and source code.”…”�”}”(hj( hj& hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK€hjÉhhubeh}”(h ]”Œannotated-target-code”ah"]”h$]”Œannotated target code”ah&]”h(]”uh*h hj}hhhh+hKyubeh}”(h ]”Œ*using-sourcemaps-and-annotated-target-code”ah"]”h$]”Œ*using sourcemaps and annotated target code”ah&]”h(]”uh*h hh hhhh+hKrubh )�”}”(hhh]”(h)�”}”(hŒStatic type validation”h]”hŒStatic type validation”…”�”}”(hjI hjG hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhjD hhhh+hK†ubh>)�”}”(hX†Static type validation is both a powerful method to catch a variety of bugs and a way to add clear, automatically checked documentation to your source code. Transcrypt includes an experimental version of `Jukka Lehtosalo's mypy static type validator `_ This validator uses :raw-html:`type hints` to rigorously cross-check correct use of datatypes all through your application. To activate static type validation use the *-ds* switch. You can combine static type validation with lightweight consistency checking using both the *-ds* and *-dc* switches.”h]”(hŒÌStatic type validation is both a powerful method to catch a variety of bugs and a way to add clear, automatically checked documentation to your source code. Transcrypt includes an experimental version of ”…”�”}”(hŒÌStatic type validation is both a powerful method to catch a variety of bugs and a way to add clear, automatically checked documentation to your source code. Transcrypt includes an experimental version of ”hjU hhhNhNubh^)�”}”(hŒG`Jukka Lehtosalo's mypy static type validator `_”h]”hŒ.Jukka Lehtosalo’s mypy static type validator”…”�”}”(hŒ,Jukka Lehtosalo's mypy static type validator”hj^ ubah}”(h ]”h"]”h$]”h&]”h(]”Œname”Œ,Jukka Lehtosalo's mypy static type validator”hpŒhttp://mypy-lang.org/”uh*h]hjU ubhs)�”}”(hŒ ”h]”h}”(h ]”Œ,jukka-lehtosalo-s-mypy-static-type-validator”ah"]”h$]”Œ,jukka lehtosalo's mypy static type validator”ah&]”h(]”Œrefuri”jo uh*hrh�KhjU ubhŒ This validator uses ”…”�”}”(hŒ This validator uses ”hjU hhhNhNubh Œraw”“”)�”}”(hŒ^:raw-html:`type hints`”h]”hŒRtype hints”…”�”}”(hhhj„ ubah}”(h ]”h"]”Œraw-html”ah$]”h&]”h(]”Œformat”Œhtml”j j¡uh*j‚ hh+hK‡hjU ubhŒ} to rigorously cross-check correct use of datatypes all through your application. To activate static type validation use the ”…”�”}”(hŒ} to rigorously cross-check correct use of datatypes all through your application. To activate static type validation use the ”hjU hhhNhNubhI)�”}”(hŒ*-ds*”h]”hŒ-ds”…”�”}”(hhhjš ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjU ubhŒe switch. You can combine static type validation with lightweight consistency checking using both the ”…”�”}”(hŒe switch. You can combine static type validation with lightweight consistency checking using both the ”hjU hhhNhNubhI)�”}”(hŒ*-ds*”h]”hŒ-ds”…”�”}”(hhhj­ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjU ubhŒ and ”…”�”}”(hŒ and ”hjU hhhNhNubhI)�”}”(hŒ*-dc*”h]”hŒ-dc”…”�”}”(hhhjÀ ubah}”(h ]”h"]”h$]”h&]”h(]”uh*hHhjU ubhŒ switches.”…”�”}”(hŒ switches.”hjU hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK‡hjD hhubh>)�”}”(hŒÜBelow is an example of code with type hints and deliberate inconsistencies, and the output of both the static type validator and the lightweight consistency checker. As can be seen, many errors can be caught in this way.”h]”hŒÜBelow is an example of code with type hints and deliberate inconsistencies, and the output of both the static type validator and the lightweight consistency checker. As can be seen, many errors can be caught in this way.”…”�”}”(hjÛ hjÙ hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK‰hjD hhubjz)�”}”(hhh]”(j)�”}”(hŒ)manual_tests/static_types/static_types.py”h]”hŒ)manual_tests/static_types/static_types.py”…”�”}”(hjì hjê ubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hK‹hjç ubj�)�”}”(hX¶# from org.transcrypt.stubs.browser import __pragma__ from typing import Iterator #, List, Dict, ClassVar import mod1 import mod2 testVar: int = 3.5 def fib (n: int) -> Iterator [int]: a, b = 0, 1 while a < n: # yield a a, b = b, a + b return 3 def add (a: int, b: int) -> None: return a + b class A: def __init__ (self) -> None: pass def test (self) -> None: return 'test' ''' __pragma__ ('ifdef', '__undefined__') # Needed because Transcrypt imports are compile time if '__undefined__' in __symbols__: # Needed because CPython doesn't understand pragmas # Variable annotations aList: List [int] = [] aString: str # Note: no initial value! class aClass: aClassVar: ClassVar [Dict [str, int]] = {} aList = [1.1, 2.2] aString = 1000 aClass.aClassVar = {'aString', 3.14} __pragma__ ('endif') '''”h]”hX¶# from org.transcrypt.stubs.browser import __pragma__ from typing import Iterator #, List, Dict, ClassVar import mod1 import mod2 testVar: int = 3.5 def fib (n: int) -> Iterator [int]: a, b = 0, 1 while a < n: # yield a a, b = b, a + b return 3 def add (a: int, b: int) -> None: return a + b class A: def __init__ (self) -> None: pass def test (self) -> None: return 'test' ''' __pragma__ ('ifdef', '__undefined__') # Needed because Transcrypt imports are compile time if '__undefined__' in __symbols__: # Needed because CPython doesn't understand pragmas # Variable annotations aList: List [int] = [] aString: str # Note: no initial value! class aClass: aClassVar: ClassVar [Dict [str, int]] = {} aList = [1.1, 2.2] aString = 1000 aClass.aClassVar = {'aString', 3.14} __pragma__ ('endif') '''”…”�”}”(hhhjø ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”Œn/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py”j j¡j¢‰jЈj£}”j¥Ksuh*jŽhh+hK‹hjç ubeh}”(h ]”Œid6”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjD hhhhhNubjz)�”}”(hhh]”(j)�”}”(hŒ!manual_tests/static_types/mod1.py”h]”hŒ!manual_tests/static_types/mod1.py”…”�”}”(hj hj ubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hK�hj ubj�)�”}”(hŒGdef test (i: int) -> int: a = 3 a = 4.5 return str (i) ”h]”hŒGdef test (i: int) -> int: a = 3 a = 4.5 return str (i) ”…”�”}”(hhhj" ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”Œf/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py”j j¡j¢‰jЈj£}”j¥Ksuh*jŽhh+hK�hj ubeh}”(h ]”Œid7”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjD hhhhhNubjz)�”}”(hhh]”(j)�”}”(hŒ*manual_tests/static_types/mod2/__init__.py”h]”hŒ*manual_tests/static_types/mod2/__init__.py”…”�”}”(hj@ hj> ubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hK•hj; ubj�)�”}”(hŒ+def test (i: str) -> str: return 3 ”h]”hŒ+def test (i: str) -> str: return 3 ”…”�”}”(hhhjL ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”Œo/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py”j j¡j¢‰jЈj£}”j¥Ksuh*jŽhh+hK•hj; ubeh}”(h ]”Œid8”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjD hhhhhNubjz)�”}”(hhh]”(j)�”}”(hŒKResults of the static type validation and the lightweight consistency check”h]”hŒKResults of the static type validation and the lightweight consistency check”…”�”}”(hjj hjh ubah}”(h ]”h"]”h$]”h&]”h(]”uh*j~hh+hKšhje ubj�)�”}”(hX Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.9.0 Copyright (C) Geatec Engineering. License: Apache 2.0 Performing static type validation on application: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/org/transcrypt/__runtime__.py The following inconsistencies were found: Success: no issues found in 1 source file Performing lightweight consistency check on module: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/org/transcrypt/__runtime__.py Line 24: undefined name 'Error' Line 25: undefined name 'Error' Line 169: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 178: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 195: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 204: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 219: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 225: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/org.transcrypt.__runtime__.js Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py:2: error: Incompatible return value type (got "int", expected "str") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:3: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:4: error: Incompatible return value type (got "str", expected "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:8: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:16: error: Incompatible return value type (got "int", expected "Iterator[int]") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:19: error: No return value expected /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:26: error: No return value expected Found 7 errors in 3 files (checked 1 source file) Performing lightweight consistency check on module: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py Line 5: 'mod1' imported but unused Line 6: 'mod2' imported but unused Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py:2: error: Incompatible return value type (got "int", expected "str") Found 1 error in 1 file (checked 1 source file) Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/mod2.js Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:3: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:4: error: Incompatible return value type (got "str", expected "int") Found 2 errors in 1 file (checked 1 source file) Performing lightweight consistency check on module: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py Line 3: local variable 'a' is assigned to but never used Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/mod1.js Performing static type validation on application: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/typing/__init__.py The following inconsistencies were found: Success: no issues found in 1 source file Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/typing.js Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/static_types.js Ready ”h]”hX Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.9.0 Copyright (C) Geatec Engineering. License: Apache 2.0 Performing static type validation on application: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/org/transcrypt/__runtime__.py The following inconsistencies were found: Success: no issues found in 1 source file Performing lightweight consistency check on module: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/org/transcrypt/__runtime__.py Line 24: undefined name 'Error' Line 25: undefined name 'Error' Line 169: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 178: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 195: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 204: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 219: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Line 225: use ==/!= to compare constant literals (str, bytes, int, float, tuple) Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/org.transcrypt.__runtime__.js Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py:2: error: Incompatible return value type (got "int", expected "str") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:3: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:4: error: Incompatible return value type (got "str", expected "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:8: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:16: error: Incompatible return value type (got "int", expected "Iterator[int]") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:19: error: No return value expected /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py:26: error: No return value expected Found 7 errors in 3 files (checked 1 source file) Performing lightweight consistency check on module: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/static_types.py Line 5: 'mod1' imported but unused Line 6: 'mod2' imported but unused Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod2/__init__.py:2: error: Incompatible return value type (got "int", expected "str") Found 1 error in 1 file (checked 1 source file) Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/mod2.js Performing static type validation on application: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py The following inconsistencies were found: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:3: error: Incompatible types in assignment (expression has type "float", variable has type "int") /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py:4: error: Incompatible return value type (got "str", expected "int") Found 2 errors in 1 file (checked 1 source file) Performing lightweight consistency check on module: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/mod1.py Line 3: local variable 'a' is assigned to but never used Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/mod1.js Performing static type validation on application: //home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/modules/typing/__init__.py The following inconsistencies were found: Success: no issues found in 1 source file Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/typing.js Saving target code in: /home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/static_types.js Ready ”…”�”}”(hhhjv ubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”Œz/home/jac/active/geatec/transcrypt/Transcrypt/transcrypt/development/manual_tests/static_types/__target__/static_types.out”j j¡j¢‰j£}”j¥Ksuh*jŽhh+hKšhje ubeh}”(h ]”Œid9”ah"]”jªah$]”h&]”h(]”Œ literal_block”ˆuh*jyhjD hhhhhNubeh}”(h ]”Œstatic-type-validation”ah"]”h$]”Œstatic type validation”ah&]”h(]”uh*h hh hhhh+hK†ubh )�”}”(hhh]”(h)�”}”(hŒ Getting help and giving feedback”h]”hŒ Getting help and giving feedback”…”�”}”(hjœ hjš hhhNhNubah}”(h ]”h"]”h$]”h&]”h(]”uh*hhj— hhhh+hKŸubh>)�”}”(hX³If you have coding questions with regard to Transcrypt applications, the best place to ask for help is `StackOverflow (tag: Transcrypt) `_. For bugs and feature requests use the `Transcrypt issue list on GitHub `_. For any matters with regard to Transcrypt you'd like to ask or discuss you can also send a email to info@transcrypt.org.”h]”(hŒgIf you have coding questions with regard to Transcrypt applications, the best place to ask for help is ”…”�”}”(hŒgIf you have coding questions with regard to Transcrypt applications, the best place to ask for help is ”hj¨ hhhNhNubh^)�”}”(hŒZ`StackOverflow (tag: Transcrypt) `_”h]”hŒStackOverflow (tag: Transcrypt)”…”�”}”(hŒStackOverflow (tag: Transcrypt)”hj± ubah}”(h ]”h"]”h$]”h&]”h(]”Œname”ŒStackOverflow (tag: Transcrypt)”hpŒ5http://stackoverflow.com/questions/tagged/transcrypt/”uh*h]hj¨ ubhs)�”}”(hŒ8 ”h]”h}”(h ]”Œstackoverflow-tag-transcrypt”ah"]”h$]”Œstackoverflow (tag: transcrypt)”ah&]”h(]”Œrefuri”j uh*hrh�Khj¨ ubhŒ(. For bugs and feature requests use the ”…”�”}”(hŒ(. For bugs and feature requests use the ”hj¨ hhhNhNubh^)�”}”(hŒP`Transcrypt issue list on GitHub `_”h]”hŒTranscrypt issue list on GitHub”…”�”}”(hŒTranscrypt issue list on GitHub”hjÕ ubah}”(h ]”h"]”h$]”h&]”h(]”Œname”ŒTranscrypt issue list on GitHub”hpŒ+https://github.com/QQuick/Transcrypt/issues”uh*h]hj¨ ubhs)�”}”(hŒ. ”h]”h}”(h ]”Œtranscrypt-issue-list-on-github”ah"]”h$]”Œtranscrypt issue list on github”ah&]”h(]”Œrefuri”jæ uh*hrh�Khj¨ ubhŒh. For any matters with regard to Transcrypt you’d like to ask or discuss you can also send a email to ”…”�”}”(hŒf. For any matters with regard to Transcrypt you'd like to ask or discuss you can also send a email to ”hj¨ hhhNhNubh^)�”}”(hŒinfo@transcrypt.org”h]”hŒinfo@transcrypt.org”…”�”}”(hhhjù ubah}”(h ]”h"]”h$]”h&]”h(]”Œrefuri”Œmailto:info@transcrypt.org”uh*h]hj¨ ubhŒ.”…”�”}”(hj:hj¨ hhhNhNubeh}”(h ]”h"]”h$]”h&]”h(]”uh*h=hh+hK hj— hhubeh}”(h ]”Œ getting-help-and-giving-feedback”ah"]”h$]”Œ getting help and giving feedback”ah&]”h(]”uh*h hh hhhh+hKŸubeh}”(h ]”Œgetting-started”ah"]”h$]”Œgetting started”ah&]”h(]”uh*h hhhhhh+hKubah}”(h ]”h"]”h$]”h&]”h(]”Œsource”h+uh*hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jF Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h+Œ _destination”NŒ _config_files”]”Œpep_references”NŒ pep_base_url”Œ https://www.python.org/dev/peps/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œhttps://tools.ietf.org/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œfile_insertion_enabled”ˆŒ raw_enabled”KŒsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”jå]”jÚasŒnameids”}”(j j j~j{h}hzjvjsjëjèjxjåjwjtj·j´jzjwjA j> jÆjÃj9 j6 j” j‘ jy jv j j jÌ jÉ jð jí uŒ nametypes”}”(j Nj~Nh}ˆjvNjëNjxˆjwNj·NjzNjA NjÆNj9 Nj” Njy ˆj NjÌ ˆjð ˆuh }”(j h j{h,hzhtjsj°jèj�jåjîjtjîj´jjwjºj> j}jÃjŽj6 jÉj‘ jD jv jp j j— jÉ jà jí jç j¨j{jÔj¯j1j j$jj jüj jç j5 j j_ j; j‰ je uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jT K s…”R”Œparse_messages”]”Œtransform_messages”]”h Œsystem_message”“”)�”}”(hhh]”h>)�”}”(hhh]”hŒ;Hyperlink target "command-line-switches" is not referenced.”…”�”}”(hhhj« ubah}”(h ]”h"]”h$]”h&]”h(]”uh*h=hj¨ ubah}”(h ]”h"]”h$]”h&]”h(]”Œlevel”KŒtype”ŒINFO”Œsource”h+Œline”KGuh*j¦ ubaŒ transformer”NŒ decoration”Nhhub.