You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(8) |
Dec
(51) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(105) |
Feb
(93) |
Mar
(194) |
Apr
(145) |
May
(100) |
Jun
(111) |
Jul
(117) |
Aug
(126) |
Sep
(233) |
Oct
(138) |
Nov
(164) |
Dec
(109) |
2002 |
Jan
(216) |
Feb
(175) |
Mar
(216) |
Apr
(194) |
May
(157) |
Jun
(140) |
Jul
(158) |
Aug
(73) |
Sep
(105) |
Oct
(164) |
Nov
(104) |
Dec
(95) |
2003 |
Jan
(72) |
Feb
(69) |
Mar
(81) |
Apr
(151) |
May
(101) |
Jun
(139) |
Jul
(99) |
Aug
(118) |
Sep
(115) |
Oct
(151) |
Nov
(161) |
Dec
(102) |
2004 |
Jan
(120) |
Feb
(175) |
Mar
(106) |
Apr
(111) |
May
(54) |
Jun
(78) |
Jul
(76) |
Aug
(105) |
Sep
(94) |
Oct
(143) |
Nov
(75) |
Dec
(85) |
2005 |
Jan
(99) |
Feb
(77) |
Mar
(164) |
Apr
(97) |
May
(79) |
Jun
(57) |
Jul
(65) |
Aug
(102) |
Sep
(95) |
Oct
(129) |
Nov
(123) |
Dec
(52) |
2006 |
Jan
(48) |
Feb
(99) |
Mar
(90) |
Apr
(51) |
May
(81) |
Jun
(136) |
Jul
(56) |
Aug
(109) |
Sep
(50) |
Oct
(44) |
Nov
(74) |
Dec
(75) |
2007 |
Jan
(92) |
Feb
(137) |
Mar
(93) |
Apr
(79) |
May
(52) |
Jun
(74) |
Jul
(143) |
Aug
(175) |
Sep
(154) |
Oct
(137) |
Nov
(88) |
Dec
(90) |
2008 |
Jan
(58) |
Feb
(113) |
Mar
(167) |
Apr
(88) |
May
(105) |
Jun
(37) |
Jul
(87) |
Aug
(72) |
Sep
(56) |
Oct
(41) |
Nov
(102) |
Dec
(70) |
2009 |
Jan
(115) |
Feb
(113) |
Mar
(126) |
Apr
(58) |
May
(125) |
Jun
(45) |
Jul
(90) |
Aug
(125) |
Sep
(84) |
Oct
(61) |
Nov
(111) |
Dec
(61) |
2010 |
Jan
(85) |
Feb
(86) |
Mar
(130) |
Apr
(58) |
May
(57) |
Jun
(32) |
Jul
(25) |
Aug
(50) |
Sep
(41) |
Oct
(65) |
Nov
(63) |
Dec
(24) |
2011 |
Jan
(43) |
Feb
(31) |
Mar
(28) |
Apr
(68) |
May
(53) |
Jun
(42) |
Jul
(58) |
Aug
(26) |
Sep
(51) |
Oct
(76) |
Nov
(60) |
Dec
(9) |
2012 |
Jan
(16) |
Feb
(32) |
Mar
(32) |
Apr
(39) |
May
(16) |
Jun
(19) |
Jul
(3) |
Aug
(11) |
Sep
(35) |
Oct
(47) |
Nov
(28) |
Dec
(18) |
2013 |
Jan
(18) |
Feb
(36) |
Mar
(10) |
Apr
(7) |
May
(7) |
Jun
(27) |
Jul
(17) |
Aug
(35) |
Sep
(19) |
Oct
(31) |
Nov
(8) |
Dec
(22) |
2014 |
Jan
(5) |
Feb
(11) |
Mar
(18) |
Apr
(23) |
May
(26) |
Jun
(14) |
Jul
(18) |
Aug
(26) |
Sep
(20) |
Oct
(48) |
Nov
(13) |
Dec
(9) |
2015 |
Jan
(9) |
Feb
(15) |
Mar
(25) |
Apr
(10) |
May
(26) |
Jun
(6) |
Jul
(13) |
Aug
(5) |
Sep
(14) |
Oct
(36) |
Nov
(24) |
Dec
(18) |
2016 |
Jan
(24) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
(7) |
Jun
(3) |
Jul
(9) |
Aug
(15) |
Sep
(22) |
Oct
(5) |
Nov
(5) |
Dec
(2) |
2017 |
Jan
(20) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(5) |
Jun
(7) |
Jul
(14) |
Aug
(9) |
Sep
(18) |
Oct
(2) |
Nov
(3) |
Dec
(3) |
2018 |
Jan
(7) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(18) |
Sep
(8) |
Oct
(9) |
Nov
(4) |
Dec
(6) |
2019 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
(8) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(5) |
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David C. <dav...@gm...> - 2016-01-12 15:03:32
|
Jim, Thanks for commenting. It works for me too *on my laptop*. It does not work for me on *the virtual machine provided by my employer*, which I now see is 'Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)'. Perhaps I should upgrade that (virtual) box to 14.04.2 LTS before bothering this list any further. Just in case it is useful, here are the results of my attempts to install several different versions of Jython that I just happened to have laying around on the virtual machine: ./installjython jython-installer-2.7.0.jar $HOME/jython2.7.0 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7.1b1.jar $HOME/jython2.7.1b1 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7.1b2.jar $HOME/jython2.7.1b2 # FAIL: passwd.pw_passwd ./installjython jython-installer-2.7-b2.jar $HOME/jython2.7b2 # PASS ./installjython jython-installer-2.7-b4.jar $HOME/jython2.7b4 # PASS And, here are the results of my attempts to install Sphinx into each of the previous attempted installations. ./installsphinx $HOME/jython2.7.0 # FAIL: umask ./installsphinx $HOME/jython2.7.1b1 # FAIL: umask ./installsphinx $HOME/jython2.7.1b2 # FAIL: umask ./installsphinx $HOME/jython2.7b2 # FAIL: CERT_REQUIRED ./installsphinx $HOME/jython2.7b4 # FAIL: umask $JAVA_HOME/bin/java -version responds as expected. I did not try unsetting JAVA_HOME, as /usr/bin/java is version 1.6.0_34. Thanks again, David On Mon, Jan 11, 2016 at 4:50 PM, Jim Baker <jim...@py...> wrote: > David, > > First, it works for me, running against 2.7.1 master. So let's see what we > have here. I think you have two separate issues: > > 1. Installing Jython, with pip support. We have been making progress on > updating various aspects of Jython 2.7.1 master so that it supports latest > pip/setuptools. (Although I think it would work with 2.7.0 final.) But to > me, your problems look more of an issue with the Jython installer (see > http://bugs.jython.org/issue2346). I would check the following > > $JAVA_HOME/bin/java -version > > If that test above doesn't work, you have a JAVA_HOME set so that it does > NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the > easiest choice.) > > 2. Using Sphinx. We have some broken unit tests in Sphinx ( > http://bugs.jython.org/issue2288), but I don't think these really matter > for Sphinx users; instead they are more useful for Jython developers to > identify good edge cases. > > So for my realistic test case, I tried running Sphinx on Jython against > the source of the Jython book, https://github.com/jython/book. After > setting up a minimal conf.py, that worked just fine. (Note we will still > need to translate some of the directives in the concurrency chapter I > wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, > which probably uses CPython to run Sphinx.) > > - JimI have JAVA_HOME pointing > > On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm...> > wrote: > >> I have made a little progress: The IOException goes away if I pass a >> full, absolute path to -d >> >> Next problem, my installation of Jython 2.7.1b2 fails with a different >> error: >> >> $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME >> Performing silent installation >> 10 % >> 20 % >> 30 % >> 40 % >> 50 % >> 60 % >> 70 % >> Generating start scripts ... >> Installing pip and setuptools >> 90 % >> ...lots of output... >> [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] >> Traceback (most recent call last): >> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in >> _run_module_as_main >> return _run_code(code, main_globals, None,I have JAVA_HOME pointing >> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code >> exec code in run_globals >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in >> <module> >> ensurepip._main() >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, >> in _main >> bootstrap( >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, >> in bootstrap >> _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) >> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, >> in _run_pip >> import pip >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", >> line 10, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line >> 17, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 109, in <module> >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 71, in _get_build_prefix >> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >> line 66, in __get_username >> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid >> return struct_passwd(entry) >> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 36, in __new__ >> pwd = (newStringOrUnicode(pwd.loginName), >> newStringOrUnicode(pwd.password), int(pwd.UID), >> NotImplementedError: passwd.pw_passwd unimplemented >> 100 % >> Congratulations! You successfully installed Jython 2.7.1b2 to directory >> /home/c11319/jython2.7.1b2. >> >> This appears to be the same issue reported here: >> >> * http://bugs.jython.org/issue2333 >> >> Try as I might, I cannot get past this. Moreover, I do not understand >> the error, as I do not see any attempt to access passwd.pw_passwd in the >> offending line (pwd.py:36). Perhaps that is a clue? >> >> This is my environment: >> >> $ export | grep -e JAVA -e JYTHON >> declare -x JAVA_ENCODING="UTF-8" >> declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" >> declare -x JAVA_MEM="512m" >> declare -x JAVA_OPTS="-verbose" >> declare -x JAVA_STACK="-Xss1024k" >> declare -x JYTHON_HOME="/home/me/jython2.7.1b2" >> declare -x JYTHON_OPTS="-v" >> >> As an aside: I thought it strange that I had to put '-Xss' into >> JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the >> '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. >> >> David >> >> >> On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> >> wrote: >> >>> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >>> dav...@gm...> wrote: >>> >>> >>>> >>>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>>> precisely the same ways. >>>> >>> >>> Damn, it was worth a shot. :/ >>> >>> I notice the original bug <http://bugs.jython.org/issue2349> notes >>> other env variables may require being set outside of JAVA_HOME >>> (comment#4). Have you looked at setting them in addition to JAVA_HOME? >>> >>> >>> --Quanah >>> >>> >>> -- >>> >>> Quanah Gibson-Mount >>> Platform Architect >>> Zimbra, Inc. >>> -------------------- >>> Zimbra :: the leader in open source messaging and collaboration >>> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > |
From: Angel D. M. G. <scy...@gm...> - 2016-01-12 05:05:53
|
Hello Guys! I recently switched my GitHub pages gears from sphinx based to Pelican and I currently use both rST and Markdown to build the site if you want to take a look at the code here which also uses travis ci to rebuild the website once some commit is pushed into the repository, If you need help on this I’ll be more than glad to help (I actually was going to propose some prototype of a website in pelican for jython.org in the next few months you got me!) I always wanted to help in the jython development but I never knew where to start looks like this could be the place right? Hahaha I’m sorry I think I answered from the wrong mail Daniel From: Darjus Loktevic Sent: Monday, January 11, 2016 9:22 PM To: Jim Baker; Fernando Cassia; Jython Developers Cc: jyt...@li... Subject: Re: [Jython-users] [Jython-dev] "Who uses Jython" page SNAFU Or we could use Python based solution: http://blog.getpelican.com/ - haven't used it, but i like that there's support for bot rST and Markdown, and Jinja is a nice template language that i actually know :) Saying all that, I love the idea of moving to Github pages. Let's do it!!! Darjus On Tue, Jan 12, 2016 at 2:49 PM Jim Baker <jim...@py...> wrote: Right, we need to provide appropriate metadata on these pages so that search engines ignore these archived pages. To make it easier to do this switch, I'm going to suggest that we move to using jython.github.io, as pointed to by a CNAME from jython.org, so we can start building out our web pages in a way that's more compatible for keeping content timely and relevant. Markdown and Jekyll look quite reasonable to me, in terms of the supporting tooling provided by GitHub. (And I could care less that any of it is powered by Ruby ;) But most importantly this will allow us to take pull requests against the Jython web site content; and maintain the news section using standard blogging. We should also be able to move all Jython wiki information under the same workflow, but that can be done incrementally. It will also depend somewhat if we can mix reStructuredText and Markdown. We recently went through the same migration process for an undergraduate course that I'm teaching this spring (http://csci3155.cs.colorado.edu/), and I found the transition to be reasonably smooth. The good thing is we can get jython.github.io completed first before we make the CNAME switchover. Timing: if this seems like a good idea, we can start this process after we complete 2.7.1 beta 3, hopefully in the next week; and have it switched over in time for 2.7.1 final. - Jim On Thu, Jan 7, 2016 at 2:55 PM, Fernando Cassia <fc...@gm...> wrote: On Thu, Jan 7, 2016 at 4:10 PM, Jim Baker <jim...@py...> wrote: The landing page for that bad link should be https://wiki.python.org/jython/, although perhaps it would be best if it were https://wiki.jython.org As for cgi-bin... I have never touched our static web pages, although I have done some wiki editing periodically. Hopefully someone can take care of this bad link soon! - Jim Thanks Jim, due to the black magic of PageRank, that page comes up as the 2nd result when you google f "Who uses Jython?" https://www.google.com/search?q=who+uses+jython&ie=utf-8&oe=utf-8 FC -- During times of Universal Deceit, telling the truth becomes a revolutionary act Durante épocas de Engaño Universal, decir la verdad se convierte en un Acto Revolucionario - George Orwell ------------------------------------------------------------------------------ _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________ Jython-dev mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-dev |
From: Darjus L. <da...@gm...> - 2016-01-12 04:20:44
|
Or we could use Python based solution: http://blog.getpelican.com/ - haven't used it, but i like that there's support for bot rST and Markdown, and Jinja is a nice template language that i actually know :) Saying all that, I love the idea of moving to Github pages. Let's do it!!! Darjus On Tue, Jan 12, 2016 at 2:49 PM Jim Baker <jim...@py...> wrote: > Right, we need to provide appropriate metadata on these pages so that > search engines ignore these archived pages. > > To make it easier to do this switch, I'm going to suggest that we move to > using jython.github.io, as pointed to by a CNAME from jython.org, so we > can start building out our web pages in a way that's more compatible for > keeping content timely and relevant. Markdown and Jekyll look quite > reasonable to me, in terms of the supporting tooling provided by GitHub. > (And I could care less that any of it is powered by Ruby ;) But most > importantly this will allow us to take pull requests against the Jython web > site content; and maintain the news section using standard blogging. > > We should also be able to move all Jython wiki information under the same > workflow, but that can be done incrementally. It will also depend somewhat > if we can mix reStructuredText and Markdown. > > We recently went through the same migration process for an undergraduate > course that I'm teaching this spring (http://csci3155.cs.colorado.edu/), > and I found the transition to be reasonably smooth. The good thing is we > can get jython.github.io completed first before we make the CNAME > switchover. > > Timing: if this seems like a good idea, we can start this process after we > complete 2.7.1 beta 3, hopefully in the next week; and have it switched > over in time for 2.7.1 final. > > - Jim > > On Thu, Jan 7, 2016 at 2:55 PM, Fernando Cassia <fc...@gm...> wrote: > >> >> On Thu, Jan 7, 2016 at 4:10 PM, Jim Baker <jim...@py...> wrote: >> >>> The landing page for that bad link should be >>> https://wiki.python.org/jython/, although perhaps it would be best if >>> it were https://wiki.jython.org >>> >>> As for cgi-bin... >>> >>> I have never touched our static web pages, although I have done some >>> wiki editing periodically. Hopefully someone can take care of this bad link >>> soon! >>> >>> - Jim >>> >> >> Thanks Jim, >> >> due to the black magic of PageRank, that page comes up as the 2nd result >> when you google f "Who uses Jython?" >> >> https://www.google.com/search?q=who+uses+jython&ie=utf-8&oe=utf-8 >> >> FC >> -- >> During times of Universal Deceit, telling the truth becomes a >> revolutionary act >> Durante épocas de Engaño Universal, decir la verdad se convierte en un >> Acto Revolucionario >> - George Orwell >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > |
From: Jim B. <jim...@py...> - 2016-01-12 03:49:15
|
Right, we need to provide appropriate metadata on these pages so that search engines ignore these archived pages. To make it easier to do this switch, I'm going to suggest that we move to using jython.github.io, as pointed to by a CNAME from jython.org, so we can start building out our web pages in a way that's more compatible for keeping content timely and relevant. Markdown and Jekyll look quite reasonable to me, in terms of the supporting tooling provided by GitHub. (And I could care less that any of it is powered by Ruby ;) But most importantly this will allow us to take pull requests against the Jython web site content; and maintain the news section using standard blogging. We should also be able to move all Jython wiki information under the same workflow, but that can be done incrementally. It will also depend somewhat if we can mix reStructuredText and Markdown. We recently went through the same migration process for an undergraduate course that I'm teaching this spring (http://csci3155.cs.colorado.edu/), and I found the transition to be reasonably smooth. The good thing is we can get jython.github.io completed first before we make the CNAME switchover. Timing: if this seems like a good idea, we can start this process after we complete 2.7.1 beta 3, hopefully in the next week; and have it switched over in time for 2.7.1 final. - Jim On Thu, Jan 7, 2016 at 2:55 PM, Fernando Cassia <fc...@gm...> wrote: > > On Thu, Jan 7, 2016 at 4:10 PM, Jim Baker <jim...@py...> wrote: > >> The landing page for that bad link should be >> https://wiki.python.org/jython/, although perhaps it would be best if it >> were https://wiki.jython.org >> >> As for cgi-bin... >> >> I have never touched our static web pages, although I have done some wiki >> editing periodically. Hopefully someone can take care of this bad link soon! >> >> - Jim >> > > Thanks Jim, > > due to the black magic of PageRank, that page comes up as the 2nd result > when you google f "Who uses Jython?" > > https://www.google.com/search?q=who+uses+jython&ie=utf-8&oe=utf-8 > > FC > -- > During times of Universal Deceit, telling the truth becomes a > revolutionary act > Durante épocas de Engaño Universal, decir la verdad se convierte en un > Acto Revolucionario > - George Orwell > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: Jim B. <jim...@py...> - 2016-01-11 23:51:26
|
David, First, it works for me, running against 2.7.1 master. So let's see what we have here. I think you have two separate issues: 1. Installing Jython, with pip support. We have been making progress on updating various aspects of Jython 2.7.1 master so that it supports latest pip/setuptools. (Although I think it would work with 2.7.0 final.) But to me, your problems look more of an issue with the Jython installer (see http://bugs.jython.org/issue2346). I would check the following $JAVA_HOME/bin/java -version If that test above doesn't work, you have a JAVA_HOME set so that it does NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the easiest choice.) 2. Using Sphinx. We have some broken unit tests in Sphinx ( http://bugs.jython.org/issue2288), but I don't think these really matter for Sphinx users; instead they are more useful for Jython developers to identify good edge cases. So for my realistic test case, I tried running Sphinx on Jython against the source of the Jython book, https://github.com/jython/book. After setting up a minimal conf.py, that worked just fine. (Note we will still need to translate some of the directives in the concurrency chapter I wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, which probably uses CPython to run Sphinx.) - Jim On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm...> wrote: > I have made a little progress: The IOException goes away if I pass a full, > absolute path to -d > > Next problem, my installation of Jython 2.7.1b2 fails with a different > error: > > $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME > Performing silent installation > 10 % > 20 % > 30 % > 40 % > 50 % > 60 % > 70 % > Generating start scripts ... > Installing pip and setuptools > 90 % > ...lots of output... > [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] > Traceback (most recent call last): > File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in > _run_module_as_main > return _run_code(code, main_globals, None, > File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code > exec code in run_globals > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in > <module> > ensurepip._main() > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, > in _main > bootstrap( > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, > in bootstrap > _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) > File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, in > _run_pip > import pip > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line > 10, in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, > in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 109, in <module> > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 71, in _get_build_prefix > File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", > line 66, in __get_username > File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid > return struct_passwd(entry) > File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 36, in __new__ > pwd = (newStringOrUnicode(pwd.loginName), > newStringOrUnicode(pwd.password), int(pwd.UID), > NotImplementedError: passwd.pw_passwd unimplemented > 100 % > Congratulations! You successfully installed Jython 2.7.1b2 to directory > /home/c11319/jython2.7.1b2. > > This appears to be the same issue reported here: > > * http://bugs.jython.org/issue2333 > > Try as I might, I cannot get past this. Moreover, I do not understand the > error, as I do not see any attempt to access passwd.pw_passwd in the > offending line (pwd.py:36). Perhaps that is a clue? > > This is my environment: > > $ export | grep -e JAVA -e JYTHON > declare -x JAVA_ENCODING="UTF-8" > declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" > declare -x JAVA_MEM="512m" > declare -x JAVA_OPTS="-verbose" > declare -x JAVA_STACK="-Xss1024k" > declare -x JYTHON_HOME="/home/me/jython2.7.1b2" > declare -x JYTHON_OPTS="-v" > > As an aside: I thought it strange that I had to put '-Xss' into > JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the > '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. > > David > > > On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> > wrote: > >> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >> dav...@gm...> wrote: >> >> >>> >>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>> precisely the same ways. >>> >> >> Damn, it was worth a shot. :/ >> >> I notice the original bug <http://bugs.jython.org/issue2349> notes other >> env variables may require being set outside of JAVA_HOME (comment#4). Have >> you looked at setting them in addition to JAVA_HOME? >> >> >> --Quanah >> >> >> -- >> >> Quanah Gibson-Mount >> Platform Architect >> Zimbra, Inc. >> -------------------- >> Zimbra :: the leader in open source messaging and collaboration >> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: <yaq...@gm...> - 2016-01-09 08:38:46
|
Jim, I have tried revised some code of Jython as below: PySystemState.java private static void initRegistry(Properties preProperties, Properties postProperties, boolean standalone, String jarFileName) PySystemState.prefix = Py.newString(prefix); to PySystemState.prefix = Py.newStringOrUnicode(prefix); PySystemState.exec_prefix = Py.newString(exec_prefix); to PySystemState.exec_prefix = Py.newStringOrUnicode(exec_prefix); private static void addPaths(PyList path, String pypath) path.append(new PyString(tok.nextToken().trim())); to path.append(Py.newStringOrUnicode(tok.nextToken().trim())); private static PyList initPath(Properties props, boolean standalone, String jarFileName) path.append(new PyString(libpath)); to path.append(Py.newStringOrUnicode(libpath)); PyObject.java public PyObject __finditem__(String key) return __finditem__(new PyString(key)); to return __finditem__(Py.newStringOrUnicode(key)); public void __setitem__(String key, PyObject value) __setitem__(new PyString(key), value); to __setitem__(Py.newStringOrUnicode(key), value); zipimporter.java private void readZipFile(ZipFile zipFile, PyObject files) PyObject __file__ = new PyString(archive + File.separator + name); to PyObject __file__ = Py.newStringOrUnicode(archive + File.separator + name); files.__setitem__(new PyString(name), entry); to files.__setitem__(Py.newStringOrUnicode(name), entry); imp.java public static PyObject createFromCode(String name, PyCode c, String moduleLocation) module.__setattr__("__file__", new PyString(moduleLocation)); to module.__setattr__("__file__", Py.newStringOrUnicode(moduleLocation)); Now Jython can be initialized with non-ASCII (such as Chinese) characters in the path. There is still a problem that the Jython module can not be loaded with non-ASCIIcharacters path. I don't know how to fix it. Can you give me some clues on it? Thanks. Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 11:36 To: yaq...@gm... CC: jython-users; Jython Developers Subject: Re: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, I believe that bug was fixed related to sockets was most likely fixed, but we have other issues where Java is using Unicode, but Python wants a str (which is just bytes). So we see it in the somewhat related bugs http://bugs.jython.org/issue2369 and http://bugs.jython.org/issue2293 (possibly others). I think the only way we are going to solve this problem is for one of us developers to attempt to do everything using a username/home directory that does not use ascii. Otherwise we are just doing piecemeal fixes. - Jim On Fri, Jan 8, 2016 at 8:06 PM, yaq...@gm... <yaq...@gm...> wrote: Dear jim, I have built Jython standalone jar for version 2.7.1b2 succesfully using 'ant all-jars' command with Java 7. But I still have below problem with newest Jython version. I am developing MeteoInfoLab software using Java and Jython (as script language). It's ok to initialize Jython when the directory path only includes ASCII characters. But the initialization will be failed if the path includes non-ASCII characters (in my case is Chinese characters). The error message shows: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value. The issue 2331 said it has been solved in 2.7.1b2 (http://bugs.jython.org/issue2331) , but the problem is still there from my test. I also mentioned that a comment report same problem in github (https://github.com/jythontools/jython/commit/c61eaefb774cdb174472265d3c27fc5b87febd34). The detailed error message: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:64) at org.python.core.PyString.<init>(PyString.java:70) at org.python.core.Py.newString(Py.java:645) at org.python.core.PySystemState.initRegistry(PySystemState.java:795) at org.python.core.PySystemState.doInitialize(PySystemState.java:1040) at org.python.core.PySystemState.initialize(PySystemState.java:969) at org.python.core.PySystemState.initialize(PySystemState.java:925) at org.python.core.PySystemState.initialize(PySystemState.java:920) at org.python.core.PySystemState.initialize(PySystemState.java:915) at org.python.core.PySystemState.initialize(PySystemState.java:911) at org.python.core.ThreadStateMapping.getThreadState(ThreadStateMapping.java:32) at org.python.core.Py.getThreadState(Py.java:1457) at org.python.core.Py.getThreadState(Py.java:1453) at org.python.core.Py.getSystemState(Py.java:1473) at org.meteoinfo.laboratory.gui.ConsoleDockable.initializeConsole(ConsoleDockable.java:65) at org.meteoinfo.laboratory.gui.ConsoleDockable.<init>(ConsoleDockable.java:47) at org.meteoinfo.laboratory.gui.FrmMain.<init>(FrmMain.java:143) at org.meteoinfo.laboratory.MeteoInfoLab$1.run(MeteoInfoLab.java:264) Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 10:10 To: yaq...@gm... CC: jython-users Subject: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, Check out the source from https://hg.python.org/jython or the mirror at https://github.com/jythontools/jython You can build from source by using this ant target: all all-jars The standalone jar is in dist/jython-standalone.jar Please note that due to the use of an older version of Antlr, building is only currently supported on Java 7; but built jars will run on Java 7, 8, or 9. (Taking into account this limitation with Java 9: http://bugs.jython.org/issue2362) Hope this helps! - Jim On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... <yaq...@gm...> wrote: How to build Jython standalone jar from source code? Any help is appreciated. Regrads Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: <yaq...@gm...> - 2016-01-09 04:12:37
|
Jim, I am trying to solve the problem from source code of Jython. I think all 'new PyString(str)' and 'Py.newString(str) functions should be replaced by 'Py.newStringOrUnicode(str)' function. But it seems 'PyObject.java' content can not be changed. For example, I changed public PyObject __finditem__(String key) { return __finditem__(new PyString(key)); } to public PyObject __finditem__(String key) { return __finditem__(Py.newStringOrUnicode(key)); } But after source code building the content of 'PyObject.java' was changed automaticlly to original content. How to solve it? Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 11:36 To: yaq...@gm... CC: jython-users; Jython Developers Subject: Re: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, I believe that bug was fixed related to sockets was most likely fixed, but we have other issues where Java is using Unicode, but Python wants a str (which is just bytes). So we see it in the somewhat related bugs http://bugs.jython.org/issue2369 and http://bugs.jython.org/issue2293 (possibly others). I think the only way we are going to solve this problem is for one of us developers to attempt to do everything using a username/home directory that does not use ascii. Otherwise we are just doing piecemeal fixes. - Jim On Fri, Jan 8, 2016 at 8:06 PM, yaq...@gm... <yaq...@gm...> wrote: Dear jim, I have built Jython standalone jar for version 2.7.1b2 succesfully using 'ant all-jars' command with Java 7. But I still have below problem with newest Jython version. I am developing MeteoInfoLab software using Java and Jython (as script language). It's ok to initialize Jython when the directory path only includes ASCII characters. But the initialization will be failed if the path includes non-ASCII characters (in my case is Chinese characters). The error message shows: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value. The issue 2331 said it has been solved in 2.7.1b2 (http://bugs.jython.org/issue2331) , but the problem is still there from my test. I also mentioned that a comment report same problem in github (https://github.com/jythontools/jython/commit/c61eaefb774cdb174472265d3c27fc5b87febd34). The detailed error message: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:64) at org.python.core.PyString.<init>(PyString.java:70) at org.python.core.Py.newString(Py.java:645) at org.python.core.PySystemState.initRegistry(PySystemState.java:795) at org.python.core.PySystemState.doInitialize(PySystemState.java:1040) at org.python.core.PySystemState.initialize(PySystemState.java:969) at org.python.core.PySystemState.initialize(PySystemState.java:925) at org.python.core.PySystemState.initialize(PySystemState.java:920) at org.python.core.PySystemState.initialize(PySystemState.java:915) at org.python.core.PySystemState.initialize(PySystemState.java:911) at org.python.core.ThreadStateMapping.getThreadState(ThreadStateMapping.java:32) at org.python.core.Py.getThreadState(Py.java:1457) at org.python.core.Py.getThreadState(Py.java:1453) at org.python.core.Py.getSystemState(Py.java:1473) at org.meteoinfo.laboratory.gui.ConsoleDockable.initializeConsole(ConsoleDockable.java:65) at org.meteoinfo.laboratory.gui.ConsoleDockable.<init>(ConsoleDockable.java:47) at org.meteoinfo.laboratory.gui.FrmMain.<init>(FrmMain.java:143) at org.meteoinfo.laboratory.MeteoInfoLab$1.run(MeteoInfoLab.java:264) Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 10:10 To: yaq...@gm... CC: jython-users Subject: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, Check out the source from https://hg.python.org/jython or the mirror at https://github.com/jythontools/jython You can build from source by using this ant target: all all-jars The standalone jar is in dist/jython-standalone.jar Please note that due to the use of an older version of Antlr, building is only currently supported on Java 7; but built jars will run on Java 7, 8, or 9. (Taking into account this limitation with Java 9: http://bugs.jython.org/issue2362) Hope this helps! - Jim On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... <yaq...@gm...> wrote: How to build Jython standalone jar from source code? Any help is appreciated. Regrads Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Jim B. <jim...@py...> - 2016-01-09 03:36:32
|
Yaqiang, I believe that bug was fixed related to sockets was most likely fixed, but we have other issues where Java is using Unicode, but Python wants a str (which is just bytes). So we see it in the somewhat related bugs http://bugs.jython.org/issue2369 and http://bugs.jython.org/issue2293 (possibly others). I think the only way we are going to solve this problem is for one of us developers to attempt to do everything using a username/home directory that does not use ascii. Otherwise we are just doing piecemeal fixes. - Jim On Fri, Jan 8, 2016 at 8:06 PM, yaq...@gm... < yaq...@gm...> wrote: > Dear jim, > > I have built Jython standalone jar for version 2.7.1b2 succesfully using > 'ant all-jars' command with Java 7. But I still have below problem with > newest Jython version. > > I am developing MeteoInfoLab software using Java and Jython (as script > language). It's ok to initialize Jython when the directory path only > includes ASCII characters. But the initialization will be failed if the > path includes non-ASCII characters (in my case is Chinese characters). The > error message shows: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value. > The issue 2331 said it has been solved in 2.7.1b2 ( > http://bugs.jython.org/issue2331) , but the problem is still there from > my test. I also mentioned that a comment report same problem in github ( > https://github.com/jythontools/jython/commit/c61eaefb774cdb174472265d3c27fc5b87febd34 > ). > > The detailed error message: > > java.lang.IllegalArgumentException: Cannot create PyString with non-byte value > at org.python.core.PyString.<init>(PyString.java:64) > at org.python.core.PyString.<init>(PyString.java:70) > at org.python.core.Py.newString(Py.java:645) > at org.python.core.PySystemState.initRegistry(PySystemState.java:795) > at org.python.core.PySystemState.doInitialize(PySystemState.java:1040) > at org.python.core.PySystemState.initialize(PySystemState.java:969) > at org.python.core.PySystemState.initialize(PySystemState.java:925) > at org.python.core.PySystemState.initialize(PySystemState.java:920) > at org.python.core.PySystemState.initialize(PySystemState.java:915) > at org.python.core.PySystemState.initialize(PySystemState.java:911) > > at org.python.core.ThreadStateMapping.getThreadState(ThreadStateMapping.java:32) > at org.python.core.Py.getThreadState(Py.java:1457) > at org.python.core.Py.getThreadState(Py.java:1453) > at org.python.core.Py.getSystemState(Py.java:1473) > > at org.meteoinfo.laboratory.gui.ConsoleDockable.initializeConsole(ConsoleDockable.java:65) > > at org.meteoinfo.laboratory.gui.ConsoleDockable.<init>(ConsoleDockable.java:47) > at org.meteoinfo.laboratory.gui.FrmMain.<init>(FrmMain.java:143) > at org.meteoinfo.laboratory.MeteoInfoLab$1.run(MeteoInfoLab.java:264) > > Regards > Yaqiang > ------------------------------ > ************************************************* > Dr. Yaqiang Wang > Chinese Academy of Meteorological Sciences (CAMS) > 46, Zhong-Guan-Cun South Avenue > Beijing, 100081 > China > > yaq...@gm... > > http://www.meteothinker.com > *https://www.researchgate.net/profile/Yaqiang_Wang5 > <https://www.researchgate.net/profile/Yaqiang_Wang5>* > ************************************************** > > > *From:* Jim Baker <jim...@py...> > *Date:* 2016-01-09 10:10 > *To:* yaq...@gm... > *CC:* jython-users <jyt...@li...> > *Subject:* Re: [Jython-users] How to build Jython standalone jar from > source code > Yaqiang, > > Check out the source from https://hg.python.org/jython or the mirror at > https://github.com/jythontools/jython > > You can build from source by using this ant target: > > all all-jars > > The standalone jar is in dist/jython-standalone.jar > > Please note that due to the use of an older version of Antlr, building is > only currently supported on Java 7; but built jars will run on Java 7, 8, > or 9. (Taking into account this limitation with Java 9: > http://bugs.jython.org/issue2362) > > Hope this helps! > > - Jim > > On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... < > yaq...@gm...> wrote: > >> How to build Jython standalone jar from source code? Any help is >> appreciated. >> >> Regrads >> Yaqiang >> ------------------------------ >> ************************************************* >> Dr. Yaqiang Wang >> Chinese Academy of Meteorological Sciences (CAMS) >> 46, Zhong-Guan-Cun South Avenue >> Beijing, 100081 >> China >> >> yaq...@gm... >> >> http://www.meteothinker.com >> *https://www.researchgate.net/profile/Yaqiang_Wang5 >> <https://www.researchgate.net/profile/Yaqiang_Wang5>* >> ************************************************** >> >> >> ------------------------------------------------------------------------------ >> Site24x7 APM Insight: Get Deep Visibility into Application Performance >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >> Monitor end-to-end web transactions and take corrective actions now >> Troubleshoot faster and improve end-user experience. Signup Now! >> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > |
From: <yaq...@gm...> - 2016-01-09 03:06:54
|
Dear jim, I have built Jython standalone jar for version 2.7.1b2 succesfully using 'ant all-jars' command with Java 7. But I still have below problem with newest Jython version. I am developing MeteoInfoLab software using Java and Jython (as script language). It's ok to initialize Jython when the directory path only includes ASCII characters. But the initialization will be failed if the path includes non-ASCII characters (in my case is Chinese characters). The error message shows: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value. The issue 2331 said it has been solved in 2.7.1b2 (http://bugs.jython.org/issue2331) , but the problem is still there from my test. I also mentioned that a comment report same problem in github (https://github.com/jythontools/jython/commit/c61eaefb774cdb174472265d3c27fc5b87febd34). The detailed error message: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:64) at org.python.core.PyString.<init>(PyString.java:70) at org.python.core.Py.newString(Py.java:645) at org.python.core.PySystemState.initRegistry(PySystemState.java:795) at org.python.core.PySystemState.doInitialize(PySystemState.java:1040) at org.python.core.PySystemState.initialize(PySystemState.java:969) at org.python.core.PySystemState.initialize(PySystemState.java:925) at org.python.core.PySystemState.initialize(PySystemState.java:920) at org.python.core.PySystemState.initialize(PySystemState.java:915) at org.python.core.PySystemState.initialize(PySystemState.java:911) at org.python.core.ThreadStateMapping.getThreadState(ThreadStateMapping.java:32) at org.python.core.Py.getThreadState(Py.java:1457) at org.python.core.Py.getThreadState(Py.java:1453) at org.python.core.Py.getSystemState(Py.java:1473) at org.meteoinfo.laboratory.gui.ConsoleDockable.initializeConsole(ConsoleDockable.java:65) at org.meteoinfo.laboratory.gui.ConsoleDockable.<init>(ConsoleDockable.java:47) at org.meteoinfo.laboratory.gui.FrmMain.<init>(FrmMain.java:143) at org.meteoinfo.laboratory.MeteoInfoLab$1.run(MeteoInfoLab.java:264) Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 10:10 To: yaq...@gm... CC: jython-users Subject: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, Check out the source from https://hg.python.org/jython or the mirror at https://github.com/jythontools/jython You can build from source by using this ant target: all all-jars The standalone jar is in dist/jython-standalone.jar Please note that due to the use of an older version of Antlr, building is only currently supported on Java 7; but built jars will run on Java 7, 8, or 9. (Taking into account this limitation with Java 9: http://bugs.jython.org/issue2362) Hope this helps! - Jim On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... <yaq...@gm...> wrote: How to build Jython standalone jar from source code? Any help is appreciated. Regrads Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: <yaq...@gm...> - 2016-01-09 02:19:37
|
Jim, Thanks a lot for your quick response. I will try it. Regards Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** From: Jim Baker Date: 2016-01-09 10:10 To: yaq...@gm... CC: jython-users Subject: Re: [Jython-users] How to build Jython standalone jar from source code Yaqiang, Check out the source from https://hg.python.org/jython or the mirror at https://github.com/jythontools/jython You can build from source by using this ant target: all all-jars The standalone jar is in dist/jython-standalone.jar Please note that due to the use of an older version of Antlr, building is only currently supported on Java 7; but built jars will run on Java 7, 8, or 9. (Taking into account this limitation with Java 9: http://bugs.jython.org/issue2362) Hope this helps! - Jim On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... <yaq...@gm...> wrote: How to build Jython standalone jar from source code? Any help is appreciated. Regrads Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Jim B. <jim...@py...> - 2016-01-09 02:11:26
|
Yaqiang, Check out the source from https://hg.python.org/jython or the mirror at https://github.com/jythontools/jython You can build from source by using this ant target: all all-jars The standalone jar is in dist/jython-standalone.jar Please note that due to the use of an older version of Antlr, building is only currently supported on Java 7; but built jars will run on Java 7, 8, or 9. (Taking into account this limitation with Java 9: http://bugs.jython.org/issue2362) Hope this helps! - Jim On Fri, Jan 8, 2016 at 7:02 PM, yaq...@gm... < yaq...@gm...> wrote: > How to build Jython standalone jar from source code? Any help is > appreciated. > > Regrads > Yaqiang > ------------------------------ > ************************************************* > Dr. Yaqiang Wang > Chinese Academy of Meteorological Sciences (CAMS) > 46, Zhong-Guan-Cun South Avenue > Beijing, 100081 > China > > yaq...@gm... > > http://www.meteothinker.com > *https://www.researchgate.net/profile/Yaqiang_Wang5 > <https://www.researchgate.net/profile/Yaqiang_Wang5>* > ************************************************** > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: <yaq...@gm...> - 2016-01-09 02:02:27
|
How to build Jython standalone jar from source code? Any help is appreciated. Regrads Yaqiang ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... http://www.meteothinker.com https://www.researchgate.net/profile/Yaqiang_Wang5 ************************************************** |
From: Fernando C. <fc...@gm...> - 2016-01-07 21:55:49
|
On Thu, Jan 7, 2016 at 4:10 PM, Jim Baker <jim...@py...> wrote: > The landing page for that bad link should be > https://wiki.python.org/jython/, although perhaps it would be best if it > were https://wiki.jython.org > > As for cgi-bin... > > I have never touched our static web pages, although I have done some wiki > editing periodically. Hopefully someone can take care of this bad link soon! > > - Jim > Thanks Jim, due to the black magic of PageRank, that page comes up as the 2nd result when you google f "Who uses Jython?" https://www.google.com/search?q=who+uses+jython&ie=utf-8&oe=utf-8 FC -- During times of Universal Deceit, telling the truth becomes a revolutionary act Durante épocas de Engaño Universal, decir la verdad se convierte en un Acto Revolucionario - George Orwell |
From: Jim B. <jim...@py...> - 2016-01-07 21:11:00
|
The landing page for that bad link should be https://wiki.python.org/jython/, although perhaps it would be best if it were https://wiki.jython.org As for cgi-bin... I have never touched our static web pages, although I have done some wiki editing periodically. Hopefully someone can take care of this bad link soon! - Jim On Thu, Jan 7, 2016 at 2:02 PM, Fernando Cassia <fc...@gm...> wrote: > http://www.jython.org/archive/21/users.html > Who uses Jython? This page has been retired. Please see JythonUsers > <http://www.jython.org/cgi-bin/wiki/JythonUsers> WIKI page. > > You follow the link and... > > http://www.jython.org/cgi-bin/wiki/JythonUsers > 404 Not Found > ------------------------------ > nginx > FC > > -- > During times of Universal Deceit, telling the truth becomes a > revolutionary act > Durante épocas de Engaño Universal, decir la verdad se convierte en un > Acto Revolucionario > - George Orwell > |
From: Fernando C. <fc...@gm...> - 2016-01-07 21:02:57
|
http://www.jython.org/archive/21/users.html Who uses Jython? This page has been retired. Please see JythonUsers <http://www.jython.org/cgi-bin/wiki/JythonUsers> WIKI page. You follow the link and... http://www.jython.org/cgi-bin/wiki/JythonUsers 404 Not Found ------------------------------ nginx FC -- During times of Universal Deceit, telling the truth becomes a revolutionary act Durante épocas de Engaño Universal, decir la verdad se convierte en un Acto Revolucionario - George Orwell |
From: David C. <dav...@gm...> - 2016-01-06 21:25:46
|
I have made a little progress: The IOException goes away if I pass a full, absolute path to -d Next problem, my installation of Jython 2.7.1b2 fails with a different error: $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME Performing silent installation 10 % 20 % 30 % 40 % 50 % 60 % 70 % Generating start scripts ... Installing pip and setuptools 90 % ...lots of output... [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] Traceback (most recent call last): File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code exec code in run_globals File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, in <module> ensurepip._main() File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, in _main bootstrap( File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, in _run_pip import pip File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 17, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 109, in <module> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 71, in _get_build_prefix File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", line 66, in __get_username File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid return struct_passwd(entry) File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 36, in __new__ pwd = (newStringOrUnicode(pwd.loginName), newStringOrUnicode(pwd.password), int(pwd.UID), NotImplementedError: passwd.pw_passwd unimplemented 100 % Congratulations! You successfully installed Jython 2.7.1b2 to directory /home/c11319/jython2.7.1b2. This appears to be the same issue reported here: * http://bugs.jython.org/issue2333 Try as I might, I cannot get past this. Moreover, I do not understand the error, as I do not see any attempt to access passwd.pw_passwd in the offending line (pwd.py:36). Perhaps that is a clue? This is my environment: $ export | grep -e JAVA -e JYTHON declare -x JAVA_ENCODING="UTF-8" declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" declare -x JAVA_MEM="512m" declare -x JAVA_OPTS="-verbose" declare -x JAVA_STACK="-Xss1024k" declare -x JYTHON_HOME="/home/me/jython2.7.1b2" declare -x JYTHON_OPTS="-v" As an aside: I thought it strange that I had to put '-Xss' into JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. David On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> wrote: > --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < > dav...@gm...> wrote: > > >> >> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >> precisely the same ways. >> > > Damn, it was worth a shot. :/ > > I notice the original bug <http://bugs.jython.org/issue2349> notes other > env variables may require being set outside of JAVA_HOME (comment#4). Have > you looked at setting them in addition to JAVA_HOME? > > > --Quanah > > > -- > > Quanah Gibson-Mount > Platform Architect > Zimbra, Inc. > -------------------- > Zimbra :: the leader in open source messaging and collaboration > |
From: Quanah Gibson-M. <qu...@zi...> - 2016-01-06 20:04:06
|
--On Wednesday, January 06, 2016 12:45 PM -0700 David Charles <dav...@gm...> wrote: > > > I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in > precisely the same ways. Damn, it was worth a shot. :/ I notice the original bug <http://bugs.jython.org/issue2349> notes other env variables may require being set outside of JAVA_HOME (comment#4). Have you looked at setting them in addition to JAVA_HOME? --Quanah -- Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration |
From: David C. <dav...@gm...> - 2016-01-06 19:45:56
|
I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in precisely the same ways. David On Wed, Jan 6, 2016 at 11:01 AM, Quanah Gibson-Mount <qu...@zi...> wrote: > --On Wednesday, January 06, 2016 10:51 AM -0700 David Charles < > dav...@gm...> wrote: > > >> >> As the subject line indicates, I am unable to install Sphinx1.3.3 into >> Jython2.7.0. I am highly motivated to get this fixed. So, even if I >> can't get a complete solution, I welcome warmly even mere 'leads' on how >> to fix this myself. I am on bended knee before the Jython Wizards. >> >> My troubles seem related to this issue: >> >> * http://bugs.jython.org/issue2349 >> >> Here are some facts about the machine: >> > > Have you used jython-2.7.1 beta 2 or later? See also < > http://bugs.jython.org/issue2405> > > --Quanah > > -- > > Quanah Gibson-Mount > Platform Architect > Zimbra, Inc. > -------------------- > Zimbra :: the leader in open source messaging and collaboration > |
From: Quanah Gibson-M. <qu...@zi...> - 2016-01-06 18:01:47
|
--On Wednesday, January 06, 2016 10:51 AM -0700 David Charles <dav...@gm...> wrote: > > > As the subject line indicates, I am unable to install Sphinx1.3.3 into > Jython2.7.0. I am highly motivated to get this fixed. So, even if I > can't get a complete solution, I welcome warmly even mere 'leads' on how > to fix this myself. I am on bended knee before the Jython Wizards. > > My troubles seem related to this issue: > > * http://bugs.jython.org/issue2349 > > Here are some facts about the machine: Have you used jython-2.7.1 beta 2 or later? See also <http://bugs.jython.org/issue2405> --Quanah -- Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration |
From: David C. <dav...@gm...> - 2016-01-06 17:51:25
|
As the subject line indicates, I am unable to install Sphinx1.3.3 into Jython2.7.0. I am highly motivated to get this fixed. So, even if I can't get a complete solution, I welcome warmly even mere 'leads' on how to fix this myself. I am on bended knee before the Jython Wizards. My troubles seem related to this issue: * http://bugs.jython.org/issue2349 Here are some facts about the machine: $ uname -a Linux mystery 3.2.0-77-generic #112-Ubuntu SMP Tue Feb 10 15:22:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux And, here is the procedure I am using, along with (most of) the output. * Notice the IOException that occurs during the installation of Jython. * Also notice t he AttributeError that occurs just before the installation of Sphinx terminates Here we go: $ export JAVA_HOME=/usr/local/jdk1.8.0_66 $ export PATH=$JAVA_HOME/bin:$PATH $ java -jar jython-installer-2.7.0.jar -s -d jython2.7.0 Performing silent installation 10 % 20 % 30 % 40 % 50 % 60 % 70 % Generating start scripts ... Installing pip and setuptools 90 % java.io.IOException: Cannot run program "jython2.7.0/bin/jython" (in directory "jython2.7.0/bin"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.python.util.install.ChildProcess.run(ChildProcess.java:272) at org.python.util.install.JarInstaller.ensurepip(JarInstaller.java:187) at org.python.util.install.JarInstaller.inflate(JarInstaller.java:152) at org.python.util.install.ConsoleInstaller.install(ConsoleInstaller.java:66) at org.python.util.install.Installation.internalMain(Installation.java:389) at org.python.util.install.Installation.main(Installation.java:43) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 6 more 100 % Congratulations! You successfully installed Jython 2.7.0 to directory /home/c11319/jython2.7.0. $ export JYTHON_HOME=`pwd`/jython2.7.0 $ cd Sphinx-1.3.3 $ JYTHON_HOME/bin/jython setup.py install ......................... ...lots of output here... ......................... Installing easy_install script to /home/c11319/jython2.7.0/bin Traceback (most recent call last): File "setup.py", line 173, in <module> setup( File "/home/c11319/jython2.7.0/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/home/c11319/jython2.7.0/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/home/c11319/jython2.7.0/Lib/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/home/c11319/jython2.7.0/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/install.py", line 67, in run File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/install.py", line 117, in do_egg_install File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 370, in run File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 594, in easy_install File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 645, in install_item File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 670, in process_distribution File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 548, in install_egg_scripts File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 747, in install_wrapper_scripts File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 783, in write_script File "/home/c11319/Sphinx-1.3.3/setuptools-7.0-py2.7.egg/setuptools/command/easy_install.py", line 2099, in current_umask AttributeError: 'module' object has no attribute 'umask' Many thanks, David |
From: Stefan R. <Ste...@gm...> - 2015-12-30 15:26:46
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Subodh,</div> <div>let me state that I did not test your code for an exact solution.</div> <div>However just by taking a look, it occurs to me that the main</div> <div>method does never load your Python code. A call like</div> <div>ie.execfile([fileWithYourPythonCode].py)</div> <div>would be needed before the class can be created etc.</div> <div>Also I don't think that "None" as a String is an appropriate argument</div> <div>where a PyObject is expected. Use Py.None instead.</div> <div> </div> <div>That said, consider to coerce your Python class into a Java interface,</div> <div>which would allow a smoother integration with Java code.</div> <div> </div> <div>Hope, this somewhat helps...</div> <div> </div> <div>-Stefan</div> <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 29. Dezember 2015 um 23:11 Uhr<br/> <b>Von:</b> "Subodh Garg-SSI" <sub...@ss...><br/> <b>An:</b> "jyt...@li..." <jyt...@li...><br/> <b>Betreff:</b> [Jython-users] How to call Python function that takes a parameter</div> <div name="quoted-content"><!--p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0.0in; font-size: 11.0pt; font-family: Calibri , sans-serif; } a:link, span.MsoHyperlink { color: blue; text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; } span.EmailStyle17 { font-family: Calibri , sans-serif; color: windowtext; } *.MsoChpDefault { font-family: Calibri , sans-serif; } div.WordSection1 { page: WordSection1; } --> <div> <div class="WordSection1"> <p class="MsoNormal">Hi All,</p> <p class="MsoNormal"> </p> <p class="MsoNormal">Here is the example Python code in hello.py and Java code. I am able to invoke run function of Python class Hello as given the code. I need help in calling “run2” function of Python in Java.</p> <p class="MsoNormal"> </p> <p class="MsoNormal">Thanks,</p> <p class="MsoNormal">Subodh</p> <p class="MsoNormal"> </p> <p class="MsoNormal">class Hello:</p> <p class="MsoNormal"> __gui = None</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> def __init__(self, gui):</p> <p class="MsoNormal"> self.__gui = gui</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> def run(self):</p> <p class="MsoNormal"> print 'Hello world!'</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> def run2(myname):</p> <p class="MsoNormal"> print myname</p> <p class="MsoNormal"> </p> <p class="MsoNormal">Here is my Java code:</p> <p class="MsoNormal">import org.python.core.PyInstance;</p> <p class="MsoNormal">import org.python.core.PyString;</p> <p class="MsoNormal">import org.python.core.PyObject;</p> <p class="MsoNormal">import org.python.util.PythonInterpreter;</p> <p class="MsoNormal">import java.lang.*;</p> <p class="MsoNormal">import java.util.*;</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> </p> <p class="MsoNormal">public class InterpreterExample</p> <p class="MsoNormal">{</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> PythonInterpreter interpreter = null;</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> </p> <p class="MsoNormal"> public InterpreterExample()</p> <p class="MsoNormal"> {</p> <p class="MsoNormal"> PythonInterpreter.initialize(System.getProperties(),</p> <p class="MsoNormal"> System.getProperties(), new String[0]);</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> this.interpreter = new PythonInterpreter();</p> <p class="MsoNormal"> }</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> void execfile( final String fileName )</p> <p class="MsoNormal"> {</p> <p class="MsoNormal"> this.interpreter.execfile(fileName);</p> <p class="MsoNormal"> }</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> PyInstance createClass( final String className, final String opts )</p> <p class="MsoNormal"> {</p> <p class="MsoNormal"> return (PyInstance) this.interpreter.eval(className + "(" + opts + ")");</p> <p class="MsoNormal"> }</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> public static void main( String gargs[] )</p> <p class="MsoNormal"> {</p> <p class="MsoNormal"> InterpreterExample ie = new InterpreterExample();</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> PyInstance hello = ie.createClass("Hello", "None");</p> <p class="MsoNormal"> </p> <p class="MsoNormal"> hello.invoke("run");</p> <p class="MsoNormal"> }</p> <p class="MsoNormal">}</p> </div> ------------------------------------------------------------------------------ _______________________________________________ Jython-users mailing list Jyt...@li... <a href="https://lists.sourceforge.net/lists/listinfo/jython-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/jython-users</a></div> </div> </div> </div> </div></div></body></html> |
From: Subodh Garg-S. <sub...@ss...> - 2015-12-29 22:25:55
|
Hi All, Here is the example Python code in hello.py and Java code. I am able to invoke run function of Python class Hello as given the code. I need help in calling "run2" function of Python in Java. Thanks, Subodh class Hello: __gui = None def __init__(self, gui): self.__gui = gui def run(self): print 'Hello world!' def run2(myname): print myname Here is my Java code: import org.python.core.PyInstance; import org.python.core.PyString; import org.python.core.PyObject; import org.python.util.PythonInterpreter; import java.lang.*; import java.util.*; public class InterpreterExample { PythonInterpreter interpreter = null; public InterpreterExample() { PythonInterpreter.initialize(System.getProperties(), System.getProperties(), new String[0]); this.interpreter = new PythonInterpreter(); } void execfile( final String fileName ) { this.interpreter.execfile(fileName); } PyInstance createClass( final String className, final String opts ) { return (PyInstance) this.interpreter.eval(className + "(" + opts + ")"); } public static void main( String gargs[] ) { InterpreterExample ie = new InterpreterExample(); PyInstance hello = ie.createClass("Hello", "None"); hello.invoke("run"); } } |
From: Joshua S. <sni...@ya...> - 2015-12-18 11:11:46
|
Yes, that was it! Thanks SO much. On Thursday, December 17, 2015 7:17 PM, Jeff Emanuel <jem...@fr...> wrote: Maybe sys.path.append('/usr/local/lib/python2.7/dist-packages') On 12/17/2015 2:34 AM, Joshua Staker wrote: Hi, I'm real new to Jython so excuse me if this is basic, but I have not been able to figure this out for the last 2 days. I am using HappyBase to interact with data in HBase. I installed HappyBase according to https://happybase.readthedocs.org/en/latest/installation.html and this is working fine with CPython. However I need it to work with Jython as this will eventually be used as a Python UDF in an Apache Pig script. However when I run 'import happybase' in Jython I get "ImportError: No module named happybase". It seems to me like I need to set an environment variable somewhere so Jython knows where to look for it, and I've tried adding the path to where I have the HappyBase __init__.py and other files to several variables but I keep getting the same error. I also tried adding the path to the sys.path in the code like below but that didn't do anything either. import sys sys.path.append('/usr/local/lib/python2.7/dist-packages/happybase') import happybase It seems to me like something that should be easy to solve....is anyone able to point me in the right direction please? I'd really appreciate it! Josh ------------------------------------------------------------------------------ _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Jeff E. <jem...@fr...> - 2015-12-17 18:17:08
|
Maybe sys.path.append('/usr/local/lib/python2.7/dist-packages') On 12/17/2015 2:34 AM, Joshua Staker wrote: > Hi, > > I'm real new to Jython so excuse me if this is basic, but I have not been able to figure this out for the last 2 days. > > I am using HappyBase to interact with data in HBase. I installed HappyBase according to https://happybase.readthedocs.org/en/latest/installation.html and this is working fine with CPython. However I need it to work with Jython as this will eventually be used as a Python UDF in an Apache Pig script. > > However when I run 'import happybase' in Jython I get "ImportError: No module named happybase". It seems to me like I need to set an environment variable somewhere so Jython knows where to look for it, and I've tried adding the path to where I have the HappyBase __init__.py and other files to several variables but I keep getting the same error. > > I also tried adding the path to the sys.path in the code like below but that didn't do anything either. > > import sys > sys.path.append('/usr/local/lib/python2.7/dist-packages/happybase') > import happybase > > It seems to me like something that should be easy to solve....is anyone able to point me in the right direction please? I'd really appreciate it! > > Josh > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Joshua S. <sni...@ya...> - 2015-12-17 09:35:52
|
Hi, I'm real new to Jython so excuse me if this is basic, but I have not been able to figure this out for the last 2 days. I am using HappyBase to interact with data in HBase. I installed HappyBase according to https://happybase.readthedocs.org/en/latest/installation.html and this is working fine with CPython. However I need it to work with Jython as this will eventually be used as a Python UDF in an Apache Pig script. However when I run 'import happybase' in Jython I get "ImportError: No module named happybase". It seems to me like I need to set an environment variable somewhere so Jython knows where to look for it, and I've tried adding the path to where I have the HappyBase __init__.py and other files to several variables but I keep getting the same error. I also tried adding the path to the sys.path in the code like below but that didn't do anything either. import syssys.path.append('/usr/local/lib/python2.7/dist-packages/happybase')import happybase It seems to me like something that should be easy to solve....is anyone able to point me in the right direction please? I'd really appreciate it! Josh |