{"id":444829,"date":"2025-01-13T15:01:00","date_gmt":"2025-01-13T15:01:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=444829"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=444829","title":{"rendered":"<span>Brython: Python \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<ul>\n<li>\n<p><a href=\"#running-python-in-the-browser-the-benefits\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#implementing-isomorphic-web-development\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#accessing-web-apis\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431-API<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#prototyping-and-javascript-libraries\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#teaching-python-to-students\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u043d\u0438\u0435 Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#taking-performance-into-account\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#having-fun\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0439\u0442\u0435\u0441\u044c<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#installing-brython\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#cdn-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CDN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#github-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#pypi-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PyPI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#npm-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 npm<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#recap-of-brython-installation-options\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0437\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#understanding-how-brython-works\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-core-components\" rel=\"noopener noreferrer nofollow\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-standard-library\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-in-action\" rel=\"noopener noreferrer nofollow\">Brython \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brythons-internals\" rel=\"noopener noreferrer nofollow\">\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#using-brython-in-the-browser\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Brython \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#the-dom-api-in-brython\" rel=\"noopener noreferrer nofollow\">API DOM \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#import-in-brython\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#reduce-import-size\" rel=\"noopener noreferrer nofollow\">\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#interacting-with-javascript\" rel=\"noopener noreferrer nofollow\">\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 JavaScript<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#javascript\" rel=\"noopener noreferrer nofollow\">JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#browser-web-api\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0431-API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#web-ui-framework\" rel=\"noopener noreferrer nofollow\">\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Web UI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#webassembly\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#applying-asynchronous-development-in-brython\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#javascript-promises-in-brython\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u043c\u0438\u0441\u044b JavaScript \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#ajax-in-brython\" rel=\"noopener noreferrer nofollow\">Ajax \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#async-io-in-brython\" rel=\"noopener noreferrer nofollow\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 \u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#coroutines\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#web-specific-functions\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0431-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#distributing-and-packaging-a-brython-project\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#manual-and-automatic-web-deployments\" rel=\"noopener noreferrer nofollow\">\u0420\u0443\u0447\u043d\u043e\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0435\u0431-\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#deploying-to-pypi\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 PyPI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#deploying-to-a-cdn\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 CDN<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#creating-google-chrome-extensions\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 Google Chrome<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#hello-world-extension-in-js\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Hello World \u043d\u0430 JS<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#hello-world-extension-in-python\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Hello World \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#testing-and-debugging-brython\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#python-unit-tests\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#selenium\" rel=\"noopener noreferrer nofollow\">Selenium<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#javascript-unit-tests\" rel=\"noopener noreferrer nofollow\">\u042e\u043d\u0438\u0442 \u0422\u0435\u0441\u0442\u044b JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#debugging-in-brython\" rel=\"noopener noreferrer nofollow\">\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0432 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#exploring-alternatives-to-brython\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0437\u043e\u0440 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#skulpt\" rel=\"noopener noreferrer nofollow\">Sculpt<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#transcrypt\" rel=\"noopener noreferrer nofollow\">Transcrypt<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#pyodide\" rel=\"noopener noreferrer nofollow\">Pyodid<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#pypyjs\" rel=\"noopener noreferrer nofollow\">PyPy.js<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><span>\u0427\u0430\u0441\u0442\u044c 1<\/span> \u2022 <a href=\"\/ru\/articles\/873174\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a> \u2022 <a href=\"\/ru\/articles\/873176\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a> \u2022 <a href=\"\/ru\/article\/872792\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 4<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" rel=\"noopener noreferrer nofollow\">JavaScript<\/a> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0437\u044b\u043a\u043e\u043c <strong>\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/strong>. \u0421\u043b\u043e\u0436\u043d\u044b\u0435 JavaScript-\u0434\u0432\u0438\u0436\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0431\u0443\u0436\u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 JavaScript. <strong>Brython<\/strong> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u043c\u0438\u0440\u043e\u0432, \u0434\u0435\u043b\u0430\u044f Python \u044f\u0437\u044b\u043a\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c \u0438 API \u043d\u0430 JavaScript, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Brython<\/strong> \u0432 \u0432\u0430\u0448\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Python-\u043a\u043e\u0434, <strong>\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441 JavaScript<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c <strong>Python \u0432 \u0441\u0432\u043e\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/p>\n<\/li>\n<li>\n<p>\u041e\u0446\u0435\u043d\u0438\u0442\u044c Brython \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 <strong>\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 Python<\/strong> \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>Python-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441 \u043e\u043f\u044b\u0442\u043e\u043c \u0432 <a href=\"https:\/\/realpython.com\/learning-paths\/become-python-web-developer\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/a> \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/HTML\" rel=\"noopener noreferrer nofollow\">HTML<\/a> \u0438 JavaScript. \u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e JavaScript, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439 <a href=\"https:\/\/realpython.com\/python-vs-javascript\/\" rel=\"noopener noreferrer nofollow\">Python \u043f\u0440\u043e\u0442\u0438\u0432 JavaScript \u0434\u043b\u044f \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432<\/a>.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/realpython\/materials\/tree\/master\/brython\" rel=\"noopener noreferrer nofollow\">github<\/a>.<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/h2>\n<p><a class=\"anchor\" name=\"running-python-in-the-browser-the-benefits\" id=\"running-python-in-the-browser-the-benefits\"><\/a><\/p>\n<p>\u0425\u043e\u0442\u044f JavaScript \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 JavaScript.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 JavaScript, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JavaScript \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043f\u0440\u0438\u0447\u0438\u043d, \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 JavaScript \u043d\u0430 \u0431\u0430\u0437\u0435 Python \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432. \u0412\u043e\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 Python \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/webappapis.html#webappapis\" rel=\"noopener noreferrer nofollow\">API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (DOM) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 JavaScript, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a Vue.js \u0438 jQuery<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044f\u0437\u044b\u043a Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 Brython<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0439\u0442\u0435 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 JavaScript. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h3>\n<p><a class=\"anchor\" name=\"implementing-isomorphic-web-development\" id=\"implementing-isomorphic-web-development\"><\/a><\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Isomorphic_JavaScript\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u044b\u0439<\/a> \u0438\u043b\u0438 <strong>\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 JavaScript<\/strong>, \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f JavaScript \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u044d\u043a\u0435\u043d\u0434 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 JavaScript, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 <a href=\"https:\/\/nodejs.org\/en\/\" rel=\"noopener noreferrer nofollow\">Node<\/a>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/realpython.com\/learning-paths\/flask-by-example\/\" rel=\"noopener noreferrer nofollow\">Flask<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/realpython.com\/tutorials\/django\/\" rel=\"noopener noreferrer nofollow\">Django<\/a>, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u043a Python, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e Python \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>Brython \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c front-end \u043d\u0430 Python \u0438 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u0430\u043a \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0421\u0428\u0410:<\/p>\n<pre><code class=\"python\">import re  def normalize_us_phone(phone: str) -&gt;; str:     \"\"\"\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0446\u0438\u0444\u0440\u044b \u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\"\"\"     return re.sub(r\"[^\\da-zA-z]\", \"\", phone)  def is_valid_us_phone(phone: str) -&gt;; bool:     \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c 10-\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\"\"\"     normalized_number = normalize_us_phone(phone)     return re.match(r\"^\\d{10}$\", normalized_number) is not None<\/code><\/pre>\n<p><em>normalize_us_phone()<\/em> \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u043d\u0435\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <em>is_valid_us_phone()<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>True<\/em> \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u0446\u0438\u0444\u0440 \u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Python, \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Brython.<\/p>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431-API<\/h3>\n<p><a class=\"anchor\" name=\"accessing-web-apis\" id=\"accessing-web-apis\"><\/a><\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/webappapis.html\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-API<\/a> \u0434\u043b\u044f JavaScript. \u042d\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e <a href=\"https:\/\/html.spec.whatwg.org\/dev\/\" rel=\"noopener noreferrer nofollow\">HTML Living Standard<\/a>. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0435\u0431-API \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Storage_API\" rel=\"noopener noreferrer nofollow\">Web Storage<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Workers_API\" rel=\"noopener noreferrer nofollow\">Web Workers<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Crypto_API\" rel=\"noopener noreferrer nofollow\">Web Crypto<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/History\" rel=\"noopener noreferrer nofollow\">History<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/URL_API\" rel=\"noopener noreferrer nofollow\">URL<\/a><\/p>\n<\/li>\n<\/ul>\n<p>Brython \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431-API \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 JavaScript. \u0412 <a href=\"#interacting-with-javascript\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435<\/a> \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0435\u0431-API.<\/p>\n<h3>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript<\/h3>\n<p><a class=\"anchor\" name=\"prototyping-and-javascript-libraries\" id=\"prototyping-and-javascript-libraries\"><\/a><\/p>\n<p>\u0427\u0430\u0441\u0442\u043e Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430, \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Brython \u044d\u0442\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/brython.info\/tests\/console.html\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c Brython<\/a> \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 <a href=\"https:\/\/brython.info\/tests\/editor.html\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/a> \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">from browser import ajax  def on_complete(req):     print(req.text)  language = \"fr\"  ajax.get(f\"https:\/\/hellosalut.stefanbohacek.dev\/?lang={language}\",          blocking=True,          oncomplete=on_complete)<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 1<\/strong> <a href=\"https:\/\/realpython.com\/python-import\/\" rel=\"noopener noreferrer nofollow\">\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442<\/a> \u043c\u043e\u0434\u0443\u043b\u044c ajax.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 3<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Callback_function\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430<\/a> <em>on_complete()<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 <em>ajax.get()<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 6 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 *ajax.get()*\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u043b\u043e\u0432\u0430 <em>hello<\/em> \u043d\u0430 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/stefanbohacek.com\/project\/hellosalut-api\/\" rel=\"noopener noreferrer nofollow\">HelloSalut API<\/a>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <em>blocking<\/em> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>True<\/em> \u0438\u043b\u0438 <em>False<\/em> \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Brython. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Brython, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em>True<\/em>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <em>Run<\/em> \u043d\u0430\u0434 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0432\u044b\u0432\u043e\u0434\u0430 \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">{\"code\":\"fr\",\"hello\":\"Salut\"}<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u0437\u044b\u043a \u0441 <em>fr<\/em> \u043d\u0430 <em>es<\/em> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041a\u043e\u0434\u044b \u044f\u0437\u044b\u043a\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u044d\u0442\u0438\u043c API, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 <a href=\"https:\/\/fourtonfish.com\/project\/hellosalut-api\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 HelloSalut<\/a>.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> HelloSalut \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/public-apis\/public-apis\" rel=\"noopener noreferrer nofollow\">Public APIs GitHub<\/a>.<\/p>\n<\/blockquote>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/github.com\/davemachado\/public-api#get-random\" rel=\"noopener noreferrer nofollow\"><s>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API<\/s><\/a><s> \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/s><a href=\"https:\/\/api.publicapis.org\/\" rel=\"noopener noreferrer nofollow\"><s>Public APIs<\/s><\/a>:<\/p>\n<pre><code class=\"python\">from browser import ajax  def on_complete(req):     print(req.text)  ajax.get(\"https:\/\/randomfox.ca\/floof\/\",          blocking=True,          oncomplete=on_complete)<\/code><\/pre>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 Brython \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <em>Run<\/em>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON:<\/p>\n<pre><code class=\"json\">{\"image\":\"https:\\\/\\\/randomfox.ca\\\/images\\\/123.jpg\",\"link\":\"https:\\\/\\\/randomfox.ca\\\/?i=123\"}<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u043c <a href=\"https:\/\/realpython.com\/python-json\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 JSON \u0432 Python<\/a>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 Python, \u043a\u0430\u043a \u0432 <a href=\"https:\/\/docs.python.org\/3\/tutorial\/interpreter.html\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0435 Python<\/a>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, Brython \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-API<\/a><\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0439\u0442\u0435 \u0441 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document_Object_Model\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (DOM)<\/a><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/jquery.com\/\" rel=\"noopener noreferrer nofollow\">jQuery<\/a>, <a href=\"https:\/\/d3js.org\/\" rel=\"noopener noreferrer nofollow\">D3<\/a> \u0438 <a href=\"https:\/\/docs.bokeh.org\/en\/latest\/index.html\" rel=\"noopener noreferrer nofollow\">Bokeh<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 JavaScript UI, \u043a\u0430\u043a <a href=\"https:\/\/vuejs.org\/\" rel=\"noopener noreferrer nofollow\">Vue.js<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u0442\u043a\u0440\u044b\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 Brython. \u042d\u0442\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0443 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u043a \u0441 Python, \u0442\u0430\u043a \u0438 \u0441 \u0432\u0435\u0431-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438.<\/p>\n<h3>\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u043d\u0438\u0435 Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c<\/h3>\n<p><a class=\"anchor\" name=\"teaching-python-to-students\" id=\"teaching-python-to-students\"><\/a><\/p>\n<p>Brython \u2014 \u044d\u0442\u043e \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Python, \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JavaScript. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Brython.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"https:\/\/realpython.com\/installing-python\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Python<\/a> \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443, \u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430, \u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442 \u0431\u044d\u043a\u044d\u043d\u0434 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c. \u0421\u0442\u0443\u0434\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 Python \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430\u0445 \u0438\u043b\u0438 Chromebook, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443.<\/p>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p><a class=\"anchor\" name=\"taking-performance-into-account\" id=\"taking-performance-into-account\"><\/a><\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 Brython \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/brython.info\/speed_results.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u0430 \u0441 CPython. \u041e\u0434\u043d\u0430\u043a\u043e Brython \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0430 \u0441\u0440\u0435\u0434\u0430 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u2014 \u044d\u0442\u043e JavaScript, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0432\u0438\u0436\u043e\u043a \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e Brython \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 JavaScript.<\/p>\n<p>Brython \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 Python \u0432 JavaScript, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434. \u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 Brython \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u0434\u0430 JavaScript \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 <a href=\"https:\/\/webassembly.org\/\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WebAssembly \u0438 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 Python \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u043c <a href=\"#webassembly\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0432\u0430\u0441 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Brython. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Python \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Brython \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; import uuid<\/code><\/pre>\n<p>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f (390 \u043c\u0441 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435) \u0437\u0430\u043c\u0435\u0442\u043d\u0430. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Brython \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c <em>uuid<\/em> \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 <em>uuid<\/em>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier#Version_4_(random)\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440<\/a> UUID \u0432\u0435\u0440\u0441\u0438\u0438 4, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; uuid.uuid4() UUID('291930f9-0c79-4c24-85fd-f76f2ada0b2a')<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432 <em>uuid.uuid4()<\/em> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/docs.python.org\/3\/library\/uuid.html#uuid.UUID\" rel=\"noopener noreferrer nofollow\">UUID<\/a>, \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u0412\u044b\u0437\u043e\u0432 <em>uuid.uuid4()<\/em> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0438 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f <em>uuid<\/em>.<\/p>\n<h3>\u0420\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0439\u0442\u0435\u0441\u044c<\/h3>\n<p><a class=\"anchor\" name=\"having-fun\" id=\"having-fun\"><\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0430\u0441, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0430 Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0412\u0438\u0434\u0435\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 Python-\u043a\u043e\u0434 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435 \u0438 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0430\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440 Brython, <a href=\"https:\/\/github.com\/PierreQuentel\" rel=\"noopener noreferrer nofollow\">\u041f\u044c\u0435\u0440 \u041a\u0435\u043d\u0442\u0435\u043b\u044c<\/a> \u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0432\u0430\u0436\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u043b\u0438 \u043e\u0431 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c Brython \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 Python \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"python\">import this<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u044b\u0442\u0443 Python \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, Brython \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0430 \u043b\u0435\u0442\u0443 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 <a href=\"https:\/\/realpython.com\/zen-of-python\/\" rel=\"noopener noreferrer nofollow\">The Zen of Python<\/a>. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 Python \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/636\/214\/479\/636214479cae2eb75544a6fa1728d5ae.png\" alt=\"\u041a\u043e\u043d\u0441\u043e\u043b\u044c Brython\" width=\"900\" height=\"555\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/636\/214\/479\/636214479cae2eb75544a6fa1728d5ae.png\"\/><\/p>\n<div><figcaption>\u041a\u043e\u043d\u0441\u043e\u043b\u044c Brython<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Easter_egg_%28media%29\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u0441\u0445\u0430\u043b\u044c\u043d\u043e\u0435 \u044f\u0439\u0446\u043e Python<\/a> \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">import antigravity<\/code><\/pre>\n<p>Brython \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435 \u0436\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <a href=\"https:\/\/www.python.org\/doc\/humor\/\" rel=\"noopener noreferrer nofollow\">\u044e\u043c\u043e\u0440\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Python.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Brython, \u0432\u044b \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445.<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Brython<\/h2>\n<p><a class=\"anchor\" name=\"installing-brython\" id=\"installing-brython\"><\/a><\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0441\u043e\u043b\u044c\u044e Brython \u2014 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u043e, \u043d\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u0430\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 Python. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Brython \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"#cdn-installation\" rel=\"noopener noreferrer nofollow\">CDN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#github-installation\" rel=\"noopener noreferrer nofollow\">GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#pypi-installation\" rel=\"noopener noreferrer nofollow\">PyPI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#npm-installation\" rel=\"noopener noreferrer nofollow\">npm<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0438\u0436\u0435, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u043a \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CDN<\/h3>\n<p><a class=\"anchor\" name=\"cdn-installation\" id=\"cdn-installation\"><\/a><\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Content_delivery_network\" rel=\"noopener noreferrer nofollow\">\u0421\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (CDN)<\/a> \u2014 \u044d\u0442\u043e \u0441\u0435\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Brython \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 CDN:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/cdnjs.com\/libraries\/brython\" rel=\"noopener noreferrer nofollow\">CDNJS<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.jsdelivr.com\/package\/npm\/brython\" rel=\"noopener noreferrer nofollow\">jsDelivr<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.cdnpkg.com\/brython\" rel=\"noopener noreferrer nofollow\">CDNPKG<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0443 <a href=\"https:\/\/jquery.com\/\" rel=\"noopener noreferrer nofollow\">jQuery<\/a>, \u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Python \u0432\u043c\u0435\u0441\u0442\u043e JavaScript.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Brython \u0441 CDN, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CDNJS. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c HTML-\u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt;     &lt;head&gt;         &lt;script           src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/brython\/3.13.0\/brython.js\"&gt;         &lt;\/script&gt;     &lt;\/head&gt;     &lt;body onload=\"brython()\"&gt;         &lt;script type=\"text\/python\"&gt;             import browser             browser.alert(\"Hello Real Python!\")         &lt;\/script&gt;     &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u044d\u0442\u043e\u0439 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412 <strong>\u0441\u0442\u0440\u043e\u043a\u0435 5<\/strong> \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f <em>brython.js<\/em> \u0438\u0437 CDNJS.<\/p>\n<\/li>\n<li>\n<p>\u0412 <strong>\u0441\u0442\u0440\u043e\u043a\u0435 8<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f <em>brython()<\/em> \u043f\u043e\u0441\u043b\u0435 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/GlobalEventHandlers\/onload\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/a>. <em>brython()<\/em> \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u0434 Python \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 JavaScript. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441\u043c. \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"\/ru\/articles\/873174\/#understanding-how-brython-works\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Brython<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 9<\/strong> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0442\u0438\u043f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <em>text\/python<\/em>. \u042d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 Brython, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 10<\/strong> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <em>browser<\/em> \u2014 \u043c\u043e\u0434\u0443\u043b\u044c Brython, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 11<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <em>alert()<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u043a\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c <em>&#171;Hello Real Python!&#187;<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u0430\u043a <em>index.html<\/em>, \u0437\u0430\u0442\u0435\u043c \u0434\u0432\u0430\u0436\u0434\u044b \u0449\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043e\u043a\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 <em>&#171;Hello Real Python!&#187;<\/em> \u041d\u0430\u0436\u043c\u0438\u0442\u0435 <em>OK<\/em>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/041\/76d\/715\/04176d715a416f6d364bffa02a707c37.png\" alt=\"\u041e\u043a\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Brython\" width=\"801\" height=\"505\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/041\/76d\/715\/04176d715a416f6d364bffa02a707c37.png\"\/><\/p>\n<div><figcaption>\u041e\u043a\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Brython<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0440\u0435\u0434\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <em>brython.js<\/em>:<\/p>\n<pre><code class=\"xml\">&lt;script   src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/brython\/3.13.0\/brython.min.js\"&gt; &lt;\/script&gt;<\/code><\/pre>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"\/ru\/articles\/873174\/#understanding-how-brython-works\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Brython<\/a> \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a Brython \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0438 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 Python.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitHub<\/h3>\n<p><a class=\"anchor\" name=\"github-installation\" id=\"github-installation\"><\/a><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitHub \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 CDN, \u043d\u043e \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Brython \u0441 development-\u0432\u0435\u0440\u0441\u0438\u0435\u0439. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c URL \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <em>head<\/em>, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 <em>index.html<\/em>:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt;   &lt;head&gt;     &lt;script       src=\"https:\/\/raw.githack.com\/brython-dev\/brython\/master\/www\/src\/brython.js\"&gt;     &lt;\/script&gt;   &lt;\/head&gt;   &lt;body onload=\"brython()\"&gt;     &lt;script type=\"text\/python\"&gt;       import browser       browser.alert(\"Hello Real Python!\")     &lt;\/script&gt;   &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u0449\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043f\u043e \u043d\u0435\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PyPI<\/h3>\n<p><a class=\"anchor\" name=\"pypi-installation\" id=\"pypi-installation\"><\/a><\/p>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 HTML-\u0444\u0430\u0439\u043b\u0435, \u0433\u0434\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043f\u0430\u043a\u0435\u0442 Brython. \u041a\u043e\u0433\u0434\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043e\u043d \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b JavaScript Brython \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b, \u043b\u0438\u0431\u043e \u0438\u0437 CDN, \u043b\u0438\u0431\u043e \u0438\u0437 GitHub.<\/p>\n<p>Brython \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/pypi.org\/project\/brython\/\" rel=\"noopener noreferrer nofollow\">PyPI<\/a>. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PyPI \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0432\u0430\u043c, \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0440\u0435\u0434\u044b Brython, \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 CDN.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Python \u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <a href=\"https:\/\/realpython.com\/what-is-pip\/\" rel=\"noopener noreferrer nofollow\">pip<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Brython \u0438\u0437 PyPI \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 <em>brython_cli<\/em> \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Brython.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043c. <a href=\"https:\/\/brython.info\/static_doc\/en\/install.html\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/a>, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 <em>brython-cli<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0440\u0435\u0434\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. <em>brython-cli<\/em> \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u041e\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u0438\u0437 <a href=\"#cdn-installation\" rel=\"noopener noreferrer nofollow\">CDN<\/a> \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"#npm-installation\" rel=\"noopener noreferrer nofollow\">npm<\/a>. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 <em>brython-cli<\/em> \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 Brython \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"https:\/\/realpython.com\/python-virtual-environments-a-primer\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 Python<\/a> \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 Linux \u0438\u043b\u0438 macOS \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">$ python3 -m venv .venv --prompt brython $ source .venv\/bin\/activate (brython) $ python -m pip install --upgrade pip Collecting pip   Downloading pip-24.3.1-py3-none-any.whl.metadata (3.7 kB) Downloading pip-24.3.1-py3-none-any.whl (1.8 MB)    ---------------------------------------- 1.8\/1.8 MB 5.0 MB\/s eta 0:00:00 Installing collected packages: pip   Attempting uninstall: pip     Found existing installation: pip 24.0     Uninstalling pip-24.0:       Successfully uninstalled pip-24.0 Successfully installed pip-24.3.1<\/code><\/pre>\n<p>\u0412 Windows \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"bash\">&gt; python3 -m venv .venv --prompt brython &gt; .venv\\Scripts\\activate (brython) &gt; python -m pip install --upgrade pip Collecting pip   Downloading pip-24.3.1-py3-none-any.whl.metadata (3.7 kB) Downloading pip-24.3.1-py3-none-any.whl (1.8 MB)    ---------------------------------------- 1.8\/1.8 MB 5.0 MB\/s eta 0:00:00 Installing collected packages: pip   Attempting uninstall: pip     Found existing installation: pip 24.0     Uninstalling pip-24.0:       Successfully uninstalled pip-24.0 Successfully installed pip-24.3.1<\/code><\/pre>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 Python \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u0435\u0435 <em>pip<\/em> \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Brython \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u0434\u043b\u044f Linux, macOS \u0438 Windows:<\/p>\n<pre><code class=\"bash\">(brython) $ python -m pip install brython Collecting brython   Downloading brython-3.13.0-py3-none-any.whl.metadata (1.0 kB) Downloading brython-3.13.0-py3-none-any.whl (1.5 MB)    ---------------------------------------- 1.5\/1.5 MB 8.6 MB\/s eta 0:00:00 Installing collected packages: brython Successfully installed brython-3.13.0 (brython) $ mkdir web (brython) $ cd web (brython) $ brython-cli install Installing Brython 3.13.0 done <\/code><\/pre>\n<p>\u0412\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Brython \u0438\u0437 PyPI, \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>web\/<\/em> \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043a\u0435\u043b\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 <em>brython-cli<\/em> \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 <em>web\/<\/em> \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <em>brython-cli install<\/em> \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0424\u0430\u0439\u043b<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">README.txt<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 Python \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c <em>demo.html<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">brython.js<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u042f\u0434\u0440\u043e Brython (\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">brython_stdlib.js<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Brython<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">demo.html<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/brython.info\/demo.html\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Brython<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">index.html<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">unicode.txt<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 Unicode (UCD), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <em>unicodedata<\/em><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0432\u0435\u0436\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre><code class=\"bash\">(brython) $ python -m http.server Serving HTTP on :: port 8000 (http:\/\/[::]:8000\/) ...<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 <em>python -m http.server<\/em> Python \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8000. \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 <em>index.html<\/em>. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 URL <a href=\"http:\/\/localhost:8000\" rel=\"noopener noreferrer nofollow\"><em>http:\/\/localhost:8000<\/em><\/a> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c <em>Hello<\/em>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/161\/8ba\/f28\/1618baf28ad7a8f11b83f3cf87c2f8fe.png\" alt=\"\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Brython\" width=\"1288\" height=\"268\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/161\/8ba\/f28\/1618baf28ad7a8f11b83f3cf87c2f8fe.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Brython<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/URL\" rel=\"noopener noreferrer nofollow\">URL<\/a> \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0430 <a href=\"http:\/\/localhost:8000\/demo.html\" rel=\"noopener noreferrer nofollow\"><em>http:\/\/localhost:8000\/demo.html<\/em><\/a>. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043d\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 Brython:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/08b\/539\/f7f\/08b539f7f575091d2670a45de7019c11.png\" alt=\"\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f Brython\" width=\"1288\" height=\"745\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/08b\/539\/f7f\/08b539f7f575091d2670a45de7019c11.png\"\/><\/p>\n<div><figcaption>\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f Brython<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0444\u0430\u0439\u043b\u044b Brython JavaScript \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0432\u0430\u0448\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <em>src<\/em> \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <em>head<\/em> \u0432 <em>index.html<\/em>:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt;   &lt;head&gt;    &lt;meta charset=\"utf-8\"&gt;    &lt;script type=\"text\/javascript\" src=\"brython.js\"&gt;&lt;\/script&gt;    &lt;script type=\"text\/javascript\" src=\"brython_stdlib.js\"&gt;&lt;\/script&gt;   &lt;\/head&gt;   &lt;body onload=\"brython(1)\"&gt;     &lt;script type=\"text\/python\"&gt;       from browser import document       document &lt;= \"Hello\"     &lt;\/script&gt;   &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>HTML \u0432\u044b\u0448\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <em>brython_cli install<\/em> \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0442\u0441\u0442\u0443\u043f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 HTML, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442.<\/p>\n<p>HTML-\u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Brython:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 6<\/strong> \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 <em>brython_stdlib.js<\/em> \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Python, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432 JavaScript.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 8<\/strong> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 brython()* \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c <em>1<\/em> \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Tools\/Browser_Console\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 10<\/strong> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <em>document<\/em> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f <em>browser<\/em>. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a DOM \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 <em>document<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0412 <strong>\u0441\u0442\u0440\u043e\u043a\u0435 11<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b <em>&lt;=<\/em> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Syntactic_sugar\" rel=\"noopener noreferrer nofollow\">\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0430\u0445\u0430\u0440\u0430<\/a>. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <em>document &lt;= &#171;Hello&#187;<\/em> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e <em>document.body.appendChild(document.createTextNode(&#171;Hello&#187;))<\/em>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 DOM \u0441\u043c. \u0432 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document\/createTextNode\" rel=\"noopener noreferrer nofollow\">Document.createTextNode<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>&lt;=<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 DOM. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f Brython, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"#the-dom-api-in-brython\" rel=\"noopener noreferrer nofollow\">API DOM \u0432 Brython<\/a>.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 npm<\/h3>\n<p><a class=\"anchor\" name=\"npm-installation\" id=\"npm-installation\"><\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435 JavaScript, \u0442\u043e <a href=\"https:\/\/www.npmjs.com\/package\/brython\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 npm<\/a> \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f <a href=\"https:\/\/nodejs.org\/en\/\" rel=\"noopener noreferrer nofollow\">Node.js<\/a> \u0438 <a href=\"https:\/\/www.npmjs.com\/\" rel=\"noopener noreferrer nofollow\">npm<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e npm \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0438 JavaScript Brython \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 JavaScript. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u0438\u043c \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c JavaScript \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a Brython. \u042d\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e npm \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong> : \u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b Node.js \u0438 npm, \u0442\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0439\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0443\u044e\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443. \u041e\u0441\u0442\u0430\u0432\u0448\u0430\u044f\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 npm \u043d\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d npm, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <a href=\"https:\/\/docs.npmjs.com\/creating-a-package-json-file\" rel=\"noopener noreferrer nofollow\">package.json<\/a> \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>npm init &#8212;yes<\/em> \u0432 \u043f\u0443\u0441\u0442\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435:<\/p>\n<pre><code class=\"bash\">$ npm init --yes Wrote to \/Users\/john\/projects\/brython\/npm_install\/package.json:  {   \"name\": \"npm_install\",   \"version\": \"1.0.0\",   \"description\": \"\",   \"main\": \"index.js\",   \"scripts\": {     \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"   },   \"keywords\": [],   \"author\": \"\",   \"license\": \"ISC\" }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Brython \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">$ npm install brython npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN npm_install@1.0.0 No description npm WARN npm_install@1.0.0 No repository field.  + brython@3.13.0 added 1 package from 1 contributor and audited 1 package in 1.778s found 0 vulnerabilities<\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Brython \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442. \u0414\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <em>package.json<\/em> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <em>dependencies<\/em>, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043b\u043e\u0432\u043e <em>brython<\/em>:<\/p>\n<pre><code class=\"json\">{   \"name\": \"npm_install\",   \"version\": \"1.0.0\",   \"description\": \"\",   \"main\": \"index.js\",   \"scripts\": {     \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"   },   \"author\": \"\",   \"license\": \"ISC\",   \"dependencies\": {     \"brython\": \"^3.13.0\"   } } <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 <em>index.html<\/em> \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c JavaScript-\u0444\u0430\u0439\u043b  <em>node_modules\/brython\/brython.js<\/em> \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt;   &lt;meta charset=\"utf-8\"&gt;   &lt;script     type=\"text\/javascript\"     src=\"node_modules\/brython\/brython.js\" defer&gt;   &lt;\/script&gt; &lt;\/head&gt; &lt;body onload=\"brython()\"&gt; &lt;script type=\"text\/python\"&gt; from browser import document document &lt;= \"Hello\" &lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 <em>index.html<\/em> \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 <em>brython.js<\/em> \u0438\u0437 URL, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0442\u0435\u0433\u0435 <em>script<\/em> \u0432 <em>index.html<\/em>. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Brython, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b JavaScript. \u0412 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u0447\u0430\u0441\u0442\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 CDN \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 PyPI.<\/p>\n<h3>\u041e\u0431\u0437\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Brython<\/h3>\n<p><a class=\"anchor\" name=\"recap-of-brython-installation-options\" id=\"recap-of-brython-installation-options\"><\/a><\/p>\n<p>Brython \u043e\u0434\u043d\u043e\u0439 \u043d\u043e\u0433\u043e\u0439 \u0441\u0442\u043e\u0438\u0442 \u0432 \u043c\u0438\u0440\u0435 Python, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0432 JavaScript. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u044d\u0442\u0443 \u043a\u0440\u043e\u0441\u0441-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0430\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u043d\u0434\u0430.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0422\u0438\u043f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/p>\n<\/th>\n<th>\n<p>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CDN<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0443 jQuery, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Python \u0432\u043c\u0435\u0441\u0442\u043e JavaScript.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">GitHub<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 CDN, \u043d\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u0435\u0439\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Brython.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">PyPI<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u0441\u043b\u0438  \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Python, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <em>pip<\/em>, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 Python \u0438 \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c. \u0412\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0438\u043b\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0430\u043a\u0435\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">npm<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 JavaScript, \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 JavaScript, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441 Node.js \u0438 npm. \u0412\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0438\u043b\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0430\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Brython.<\/p>\n<p><a href=\"\/ru\/articles\/873174\/\" rel=\"noopener noreferrer nofollow\">\u0414\u0430\u043b\u0435\u0435..<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/872822\/\"> https:\/\/habr.com\/ru\/articles\/872822\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<ul>\n<li>\n<p><a href=\"#running-python-in-the-browser-the-benefits\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#implementing-isomorphic-web-development\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#accessing-web-apis\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431-API<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#prototyping-and-javascript-libraries\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#teaching-python-to-students\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u043d\u0438\u0435 Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#taking-performance-into-account\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#having-fun\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0439\u0442\u0435\u0441\u044c<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#installing-brython\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#cdn-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CDN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#github-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#pypi-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PyPI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#npm-installation\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 npm<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#recap-of-brython-installation-options\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0437\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#understanding-how-brython-works\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-core-components\" rel=\"noopener noreferrer nofollow\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-standard-library\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brython-in-action\" rel=\"noopener noreferrer nofollow\">Brython \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#brythons-internals\" rel=\"noopener noreferrer nofollow\">\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#using-brython-in-the-browser\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Brython \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#the-dom-api-in-brython\" rel=\"noopener noreferrer nofollow\">API DOM \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#import-in-brython\" rel=\"noopener noreferrer nofollow\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873174\/#reduce-import-size\" rel=\"noopener noreferrer nofollow\">\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#interacting-with-javascript\" rel=\"noopener noreferrer nofollow\">\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 JavaScript<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#javascript\" rel=\"noopener noreferrer nofollow\">JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#browser-web-api\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0431-API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#web-ui-framework\" rel=\"noopener noreferrer nofollow\">\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Web UI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#webassembly\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#applying-asynchronous-development-in-brython\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#javascript-promises-in-brython\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u043c\u0438\u0441\u044b JavaScript \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#ajax-in-brython\" rel=\"noopener noreferrer nofollow\">Ajax \u0432 Brython<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#async-io-in-brython\" rel=\"noopener noreferrer nofollow\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 \u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#coroutines\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/873176\/#web-specific-functions\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0431-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#distributing-and-packaging-a-brython-project\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#manual-and-automatic-web-deployments\" rel=\"noopener noreferrer nofollow\">\u0420\u0443\u0447\u043d\u043e\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0435\u0431-\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#deploying-to-pypi\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 PyPI<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#deploying-to-a-cdn\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 CDN<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#creating-google-chrome-extensions\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 Google Chrome<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#hello-world-extension-in-js\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Hello World \u043d\u0430 JS<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#hello-world-extension-in-python\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Hello World \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#testing-and-debugging-brython\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#python-unit-tests\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#selenium\" rel=\"noopener noreferrer nofollow\">Selenium<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#javascript-unit-tests\" rel=\"noopener noreferrer nofollow\">\u042e\u043d\u0438\u0442 \u0422\u0435\u0441\u0442\u044b JavaScript<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#debugging-in-brython\" rel=\"noopener noreferrer nofollow\">\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0432 Brython<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#exploring-alternatives-to-brython\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0437\u043e\u0440 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432 Brython<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#skulpt\" rel=\"noopener noreferrer nofollow\">Sculpt<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#transcrypt\" rel=\"noopener noreferrer nofollow\">Transcrypt<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#pyodide\" rel=\"noopener noreferrer nofollow\">Pyodid<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#pypyjs\" rel=\"noopener noreferrer nofollow\">PyPy.js<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/ru\/articles\/872792\/#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><span>\u0427\u0430\u0441\u0442\u044c 1<\/span> \u2022 <a href=\"\/ru\/articles\/873174\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a> \u2022 <a href=\"\/ru\/articles\/873176\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a> \u2022 <a href=\"\/ru\/article\/872792\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 4<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" rel=\"noopener noreferrer nofollow\">JavaScript<\/a> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0437\u044b\u043a\u043e\u043c <strong>\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/strong>. \u0421\u043b\u043e\u0436\u043d\u044b\u0435 JavaScript-\u0434\u0432\u0438\u0436\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0431\u0443\u0436\u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 JavaScript. <strong>Brython<\/strong> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u043c\u0438\u0440\u043e\u0432, \u0434\u0435\u043b\u0430\u044f Python \u044f\u0437\u044b\u043a\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c \u0438 API \u043d\u0430 JavaScript, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Brython<\/strong> \u0432 \u0432\u0430\u0448\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Python-\u043a\u043e\u0434, <strong>\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441 JavaScript<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c <strong>Python \u0432 \u0441\u0432\u043e\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/p>\n<\/li>\n<li>\n<p>\u041e\u0446\u0435\u043d\u0438\u0442\u044c Brython \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 <strong>\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 Python<\/strong> \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>Python-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441 \u043e\u043f\u044b\u0442\u043e\u043c \u0432 <a href=\"https:\/\/realpython.com\/learning-paths\/become-python-web-developer\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/a> \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/HTML\" rel=\"noopener noreferrer nofollow\">HTML<\/a> \u0438 JavaScript. \u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u043e JavaScript, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439 <a href=\"https:\/\/realpython.com\/python-vs-javascript\/\" rel=\"noopener noreferrer nofollow\">Python \u043f\u0440\u043e\u0442\u0438\u0432 JavaScript \u0434\u043b\u044f \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432<\/a>.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/realpython\/materials\/tree\/master\/brython\" rel=\"noopener noreferrer nofollow\">github<\/a>.<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/h2>\n<p><a class=\"anchor\" name=\"running-python-in-the-browser-the-benefits\" id=\"running-python-in-the-browser-the-benefits\"><\/a><\/p>\n<p>\u0425\u043e\u0442\u044f JavaScript \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 JavaScript.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 JavaScript, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JavaScript \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043f\u0440\u0438\u0447\u0438\u043d, \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 JavaScript \u043d\u0430 \u0431\u0430\u0437\u0435 Python \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432. \u0412\u043e\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 Python \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/webappapis.html#webappapis\" rel=\"noopener noreferrer nofollow\">API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (DOM) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 JavaScript, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a Vue.js \u0438 jQuery<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044f\u0437\u044b\u043a Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 Brython<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0439\u0442\u0435 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 JavaScript. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h3>\n<p><a class=\"anchor\" name=\"implementing-isomorphic-web-development\" id=\"implementing-isomorphic-web-development\"><\/a><\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Isomorphic_JavaScript\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u044b\u0439<\/a> \u0438\u043b\u0438 <strong>\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 JavaScript<\/strong>, \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f JavaScript \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u044d\u043a\u0435\u043d\u0434 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 JavaScript, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 <a href=\"https:\/\/nodejs.org\/en\/\" rel=\"noopener noreferrer nofollow\">Node<\/a>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Python, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/realpython.com\/learning-paths\/flask-by-example\/\" rel=\"noopener noreferrer nofollow\">Flask<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/realpython.com\/tutorials\/django\/\" rel=\"noopener noreferrer nofollow\">Django<\/a>, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u043a Python, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e Python \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>Brython \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c front-end \u043d\u0430 Python \u0438 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u0430\u043a \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0421\u0428\u0410:<\/p>\n<pre><code class=\"python\">import re  def normalize_us_phone(phone: str) -&gt;; str:     \"\"\"\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0446\u0438\u0444\u0440\u044b \u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\"\"\"     return re.sub(r\"[^\\da-zA-z]\", \"\", phone)  def is_valid_us_phone(phone: str) -&gt;; bool:     \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c 10-\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\"\"\"     normalized_number = normalize_us_phone(phone)     return re.match(r\"^\\d{10}$\", normalized_number) is not None<\/code><\/pre>\n<p><em>normalize_us_phone()<\/em> \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u043d\u0435\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <em>is_valid_us_phone()<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>True<\/em> \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u0446\u0438\u0444\u0440 \u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Python, \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Brython.<\/p>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431-API<\/h3>\n<p><a class=\"anchor\" name=\"accessing-web-apis\" id=\"accessing-web-apis\"><\/a><\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/webappapis.html\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-API<\/a> \u0434\u043b\u044f JavaScript. \u042d\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e <a href=\"https:\/\/html.spec.whatwg.org\/dev\/\" rel=\"noopener noreferrer nofollow\">HTML Living Standard<\/a>. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0435\u0431-API \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Storage_API\" rel=\"noopener noreferrer nofollow\">Web Storage<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Workers_API\" rel=\"noopener noreferrer nofollow\">Web Workers<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Crypto_API\" rel=\"noopener noreferrer nofollow\">Web Crypto<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/History\" rel=\"noopener noreferrer nofollow\">History<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/URL_API\" rel=\"noopener noreferrer nofollow\">URL<\/a><\/p>\n<\/li>\n<\/ul>\n<p>Brython \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431-API \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 JavaScript. \u0412 <a href=\"#interacting-with-javascript\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435<\/a> \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0435\u0431-API.<\/p>\n<h3>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript<\/h3>\n<p><a class=\"anchor\" name=\"prototyping-and-javascript-libraries\" id=\"prototyping-and-javascript-libraries\"><\/a><\/p>\n<p>\u0427\u0430\u0441\u0442\u043e Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430, \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Brython \u044d\u0442\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/brython.info\/tests\/console.html\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c Brython<\/a> \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 <a href=\"https:\/\/brython.info\/tests\/editor.html\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440<\/a> \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">from browser import ajax  def on_complete(req):     print(req.text)  language = \"fr\"  ajax.get(f\"https:\/\/hellosalut.stefanbohacek.dev\/?lang={language}\",          blocking=True,          oncomplete=on_complete)<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 1<\/strong> <a href=\"https:\/\/realpython.com\/python-import\/\" rel=\"noopener noreferrer nofollow\">\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442<\/a> \u043c\u043e\u0434\u0443\u043b\u044c ajax.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u0430 3<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Callback_function\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430<\/a> <em>on_complete()<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 <em>ajax.get()<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 6 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 *ajax.get()*\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u043b\u043e\u0432\u0430 <em>hello<\/em> \u043d\u0430 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/stefanbohacek.com\/project\/hellosalut-api\/\" rel=\"noopener noreferrer nofollow\">HelloSalut API<\/a>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <em>blocking<\/em> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>True<\/em> \u0438\u043b\u0438 <em>False<\/em> \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Brython. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Brython, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em>True<\/em>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <em>Run<\/em> \u043d\u0430\u0434 \u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0432\u044b\u0432\u043e\u0434\u0430 \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">{\"code\":\"fr\",\"hello\":\"Salut\"}<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u0437\u044b\u043a \u0441 <em>fr<\/em> \u043d\u0430 <em>es<\/em> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041a\u043e\u0434\u044b \u044f\u0437\u044b\u043a\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u044d\u0442\u0438\u043c API, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 <a href=\"https:\/\/fourtonfish.com\/project\/hellosalut-api\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 HelloSalut<\/a>.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> HelloSalut \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/public-apis\/public-apis\" rel=\"noopener noreferrer nofollow\">Public APIs GitHub<\/a>.<\/p>\n<\/blockquote>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/github.com\/davemachado\/public-api#get-random\" rel=\"noopener noreferrer nofollow\"><s>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API<\/s><\/a><s> \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/s><a href=\"https:\/\/api.publicapis.org\/\" rel=\"noopener noreferrer nofollow\"><s>Public APIs<\/s><\/a>:<\/p>\n<pre><code class=\"python\">from browser import ajax  def on_complete(req):     print(req.text)  ajax.get(\"https:\/\/randomfox.ca\/floof\/\",          blocking=True,          oncomplete=on_complete)<\/code><\/pre>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 Brython \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <em>Run<\/em>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON:<\/p>\n<pre><code class=\"json\">{\"image\":\"https:\\\/\\\/randomfox.ca\\\/images\\\/123.jpg\",\"link\":\"https:\\\/\\\/randomfox.ca\\\/?i=123\"}<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u043c <a href=\"https:\/\/realpython.com\/python-json\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 JSON \u0432 Python<\/a>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 Python, \u043a\u0430\u043a \u0432 <a href=\"https:\/\/docs.python.org\/3\/tutorial\/interpreter.html\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0435 Python<\/a>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, Brython \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-API<\/a><\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0439\u0442\u0435 \u0441 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document_Object_Model\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (DOM)<\/a><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 JavaScript, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/jquery.com\/\" rel=\"noopener noreferrer nofollow\">jQuery<\/a>, <a href=\"https:\/\/d3js.org\/\" rel=\"noopener noreferrer nofollow\">D3<\/a> \u0438 <a href=\"https:\/\/docs.bokeh.org\/en\/latest\/index.html\" rel=\"noopener noreferrer nofollow\">Bokeh<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 JavaScript UI, \u043a\u0430\u043a <a href=\"https:\/\/vuejs.org\/\" rel=\"noopener noreferrer nofollow\">Vue.js<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u0442\u043a\u0440\u044b\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 Brython. \u042d\u0442\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0443 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u043a \u0441 Python, \u0442\u0430\u043a \u0438 \u0441 \u0432\u0435\u0431-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438.<\/p>\n<h3>\u041f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u043d\u0438\u0435 Python \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c<\/h3>\n<p><a class=\"anchor\" name=\"teaching-python-to-students\" id=\"teaching-python-to-students\"><\/a><\/p>\n<p>Brython \u2014 \u044d\u0442\u043e \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Python, \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JavaScript. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 Python \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Brython.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043d\u043b\u0430\u0439\u043d-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"https:\/\/realpython.com\/installing-python\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Python<\/a> \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443, \u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430, \u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442 \u0431\u044d\u043a\u044d\u043d\u0434 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c. \u0421\u0442\u0443\u0434\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 Python \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430\u0445 \u0438\u043b\u0438 Chromebook, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443.<\/p>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p><a class=\"anchor\" name=\"taking-performance-into-account\" id=\"taking-performance-into-account\"><\/a><\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 Brython \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/brython.info\/speed_results.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u0430 \u0441 CPython. \u041e\u0434\u043d\u0430\u043a\u043e Brython \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0430 \u0441\u0440\u0435\u0434\u0430 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u2014 \u044d\u0442\u043e JavaScript, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0432\u0438\u0436\u043e\u043a \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e Brython \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 JavaScript.<\/p>\n<p>Brython \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 Python \u0432 JavaScript, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434. \u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 Brython \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u0434\u0430 JavaScript \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 <a href=\"https:\/\/webassembly.org\/\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WebAssembly \u0438 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 Python \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u043c <a href=\"#webassembly\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0432\u0430\u0441 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Brython. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Python \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Brython \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">&gt;&gt;&gt; import uuid<\/code><\/pre>\n<p>\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f (390 \u043c\u0441 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435) \u0437\u0430\u043c\u0435\u0442\u043d\u0430. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Brython \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c <em>u<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-444829","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=444829"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444829\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=444829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=444829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=444829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}