{"id":4170,"date":"2021-08-02T08:05:51","date_gmt":"2021-08-02T08:05:51","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=4170"},"modified":"2021-08-02T08:05:51","modified_gmt":"2021-08-02T08:05:51","slug":"jython-java-prilozhenie","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/uk\/jython-java-prilozhenie\/","title":{"rendered":"Jython \u2014 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435&nbsp;<strong>jython-standalone-2.7.0.jar<\/strong>&nbsp;\u2014 \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f Jython \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Java \u0441 \u0438\u0445 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a:&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/translate.googleusercontent.com\/translate_c?depth=1&amp;rurl=translate.google.ru&amp;sl=en&amp;sp=nmt4&amp;tl=ru&amp;u=http:\/\/www.jython.org\/downloads.html&amp;xid=17259,15700022,15700186,15700190,15700256,15700259,15700262&amp;usg=ALkJrhhQbIP3BRTBxa9KBywrlSvTfeVtgw\">http:\/\/www.jython.org\/downloads.html<\/a>&nbsp;\u0438&nbsp;<strong>\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435<\/strong>&nbsp;\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b jar \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b Java CLASSPATH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043b\u0430\u0441\u0441&nbsp;<strong>PythonInterpreter<\/strong>&nbsp;.&nbsp;\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043b\u044e\u0431\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 Python \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c&nbsp;<strong>\u043c\u0435\u0442\u043e\u0434\u0430 execfile ()<\/strong>&nbsp;.&nbsp;PythonInterpreter \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c&nbsp;<strong>PyObjects<\/strong>&nbsp;\u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.&nbsp;\u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Jython, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430 PyObject \u0438\u043b\u0438 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043b\u0430\u0441\u0441 PythonInterpreter \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0438\u0436\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Sr.No.<\/th><th>\u041c\u0435\u0442\u043e\u0434 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th><\/tr><tr><td>1<\/td><td><strong>setIn (PyObject)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>2<\/td><td><strong>setIn (java.io.Reader)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Reader \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>3<\/td><td><strong>setIn (java.io.InputStream)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.InputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>4<\/td><td><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (PyObject)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0432\u044b\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>5<\/td><td><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (java.io.Writer)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Writer, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>6<\/td><td><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (Java, io.OutputStream)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.OutputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430<\/td><\/tr><tr><td>7<\/td><td><strong>setErr (PyObject)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a<\/td><\/tr><tr><td>8<\/td><td><strong>setErr (java.io.Writer<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Writer, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/td><\/tr><tr><td>9<\/td><td><strong>setErr (java.io.OutputStream)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.OutputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/td><\/tr><tr><td>10<\/td><td><strong>Eval (String)<\/strong>\u041e\u0446\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a Python \u0438 \u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/td><\/tr><tr><td>11<\/td><td><strong>Eval (PyObject)<\/strong>\u041e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0434\u0430 Python \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/td><\/tr><tr><td>12<\/td><td><strong>Exec (String)<\/strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>13<\/td><td><strong>Exec (PyObject)<\/strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0434\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>14<\/td><td><strong>execfile (\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430)<\/strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>15<\/td><td><strong>ExecFile (java.io.InputStream)<\/strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>16<\/td><td><strong>\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 (String)<\/strong>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 Python \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c<\/td><\/tr><tr><td>17<\/td><td><strong>\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0441\u043a\u0440\u0438\u043f\u0442, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430)<\/strong>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Python \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c<\/td><\/tr><tr><td>18<\/td><td><strong>set (\u0438\u043c\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>19<\/td><td><strong>set (\u0438\u043c\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 PyObject)<\/strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 PyObject \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>20<\/td><td><strong>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (String)<\/strong>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/td><\/tr><tr><td>21<\/td><td><strong>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0438\u043c\u044f, \u043a\u043b\u0430\u0441\u0441<\/strong>&nbsp;<strong>JavaClass<\/strong>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.&nbsp;\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u043a\u0430\u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0430\u043d\u043d\u043e\u0433\u043e Java-\u043a\u043b\u0430\u0441\u0441\u0430.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setIn (PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setIn (java.io.Reader)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Reader \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setIn (java.io.InputStream)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.InputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (java.io.Writer)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Writer, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043d\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043b (Java, io.OutputStream)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.OutputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setErr (PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 Python \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setErr (java.io.Writer<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.Writer, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>setErr (java.io.OutputStream)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 java.io.OutputStream, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Eval (String)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0446\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a Python \u0438 \u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Eval (PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0434\u0430 Python \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Exec (String)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Exec (PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u0434\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>execfile (\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ExecFile (java.io.InputStream)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 Python \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 (String)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 Python \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0441\u043a\u0440\u0438\u043f\u0442, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 Python \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>set (\u0438\u043c\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>set (\u0438\u043c\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 PyObject)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 PyObject \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (String)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0438\u043c\u044f, \u043a\u043b\u0430\u0441\u0441<\/strong>&nbsp;<strong>JavaClass<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d.&nbsp;\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u043a\u0430\u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0430\u043d\u043d\u043e\u0433\u043e Java-\u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 Java-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0438\u043c\u0435\u044e\u0449\u0443\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Jython-\u0441\u043a\u0440\u0438\u043f\u0442&nbsp;<strong>\u00abhello.py\u00bb .usingexecfile ()<\/strong>&nbsp;\u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 PythonInterpreter.&nbsp;\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e Python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 set () \u0438 get ().<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import org.python.util.PythonInterpreter;\nimport org.python.core.*;\n\npublic class SimpleEmbedded {\n   public static void main(String []args) throws PyException {\n      PythonInterpreter interp = new PythonInterpreter();\n      System.out.println(\"Hello, world from Java\");\n      interp.execfile(\"hello.py\");\n      interp.set(\"a\", new PyInteger(42));\n      interp.exec(\"print a\");\n      interp.exec(\"x = 2+2\");\n      PyObject x = interp.get(\"x\");\n      System.out.println(\"x: \"+x);\n      System.out.println(\"Goodbye \");\n   }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u0443\u044e Java-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435&nbsp;jython-standalone-2.7.0.jar&nbsp;\u2014 \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f Jython \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Java \u0441 \u0438\u0445 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a:&nbsp;http:\/\/www.jython.org\/downloads.html&nbsp;\u0438&nbsp;\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435&nbsp;\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b jar \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b Java CLASSPATH. \u042d\u0442\u0430 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[129],"tags":[],"class_list":["post-4170","page","type-page","status-publish","hentry","category-jython"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/comments?post=4170"}],"version-history":[{"count":0,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/media?parent=4170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/categories?post=4170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/tags?post=4170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}