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: John A. <day...@gm...> - 2017-06-01 17:25:47
|
I have a Python app that uses Kivy. I would like to do some debugging on this app using Netbeans. I can run the app in Netbeans using a Python platform, but cannot use the debugger. If I select the Jython platform, the debugger is available, but when I try to run the app it complains about no Kivy module. I cannot find any information about installing Kivy in Jython. Is it possible to install Kivy under Jython? If so, can anyone give me a hint on how to install it? Thanks, -John |
From: Darjus L. <da...@gm...> - 2017-05-16 20:47:44
|
Hey Stefan, Sorry could not join, traveling. How did it go? Cheers, Darjus On Tue, May 2, 2017 at 9:44 AM Stefan Richthofer <Ste...@gm...> wrote: > Dear Jython developers and users, > > I will be leading a Jython sprint at "Python Meeting Düsseldorf"'s overall > Python sprint, http://www.pyddf.de/sprint2017 next weekend. (6th and 7th > of May in Düsseldorf, Germany) > I'm aware that hardly anyone from this list can make it there in person > (if so, even better!), but please feel encouraged to participate remotely > via Jython's IRC-channel irc://irc.freenode.net/#jython. We will be > online there 11.00-17.30 CEST each day (and hopefully fill it with more > activity than usual). > > Potential topics include: > > Using Jython: > - Jython basics / getting started > - Python/Java integration (e.g. calling Java from Python and vice versa) > - scripting Java with Jython > - GUI with JavaFX in Python > > Developing Jython: > - Jython internals / getting started > - Bugfixes in Jython core - Can we fix some actual bugs? > (I will especially look into current release blockers > http://bugs.jython.org/issue2487 and http://bugs.jython.org/issue2570) > > Experimental stuff (What is already workable? Let's try!): > - JyNI (e.g. NumPy, ctypes) > - Jython 3 > > Individual stuff: > - You have some project or usecase for Jython and need advice? > - There is some specific gap keeping you from using Jython? -- Maybe we > can fix it or work around. > -- Maybe even if it involves a C-Extension (let's tweak JyNI) > > Looking forward to work with you! > > -Stefan > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > |
From: Stefan R. <Ste...@gm...> - 2017-05-02 16:43:07
|
Dear Jython developers and users, I will be leading a Jython sprint at "Python Meeting Düsseldorf"'s overall Python sprint, http://www.pyddf.de/sprint2017 next weekend. (6th and 7th of May in Düsseldorf, Germany) I'm aware that hardly anyone from this list can make it there in person (if so, even better!), but please feel encouraged to participate remotely via Jython's IRC-channel irc://irc.freenode.net/#jython. We will be online there 11.00-17.30 CEST each day (and hopefully fill it with more activity than usual). Potential topics include: Using Jython: - Jython basics / getting started - Python/Java integration (e.g. calling Java from Python and vice versa) - scripting Java with Jython - GUI with JavaFX in Python Developing Jython: - Jython internals / getting started - Bugfixes in Jython core - Can we fix some actual bugs? (I will especially look into current release blockers http://bugs.jython.org/issue2487 and http://bugs.jython.org/issue2570) Experimental stuff (What is already workable? Let's try!): - JyNI (e.g. NumPy, ctypes) - Jython 3 Individual stuff: - You have some project or usecase for Jython and need advice? - There is some specific gap keeping you from using Jython? -- Maybe we can fix it or work around. -- Maybe even if it involves a C-Extension (let's tweak JyNI) Looking forward to work with you! -Stefan |
From: Тихомиров В. <int...@ya...> - 2017-05-01 17:27:22
|
<div>I tried interactive. It works in place of standard interpreter but its interrupt(Py.getThreadState()) does nothing. The program keeps running after it.</div><div> </div><div>-------- Пересылаемое сообщение --------</div><div>01.05.2017, 19:39, "Stefan Richthofer" <ste...@gm...>:</div><div> </div><div>Did you try to create a http://www.jython.org/javadoc/org/python/util/InteractiveInterpreter.html instead? (It's a subclass of PythonInterpreter, so features all of its methods too.) Then you can call interrupt on it, e.g. interrupt(Py.getThreadState()).</div><div>(Disclaimer: Didn't try myself, so no idea if this works as expected.)</div><div> </div><div>Best</div><div> </div><div>-Stefan</div><div> </div><div>> Gesendet: Montag, 01. Mai 2017 um 16:31 Uhr</div><div>> Von: "Тихомиров Валентин" <int...@ya...></div><div>> An: jyt...@li...</div><div>> Betreff: [Jython-users] Can I cancel Pythoninterpreter's evaluation?</div><div>></div><div>> I use some http://www.jython.org/javadoc/org/python/util/PythonInterpreter.html. It has methods to evaluate a script. What do you do for preliminary termination of the execution?</div><div>></div><div>> ------------------------------------------------------------------------------</div><div>> Check out the vibrant tech community on one of the world's most</div><div>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot</div><div>> _______________________________________________</div><div>> Jython-users mailing list</div><div>> Jyt...@li...</div><div>> https://lists.sourceforge.net/lists/listinfo/jython-users</div><div>-------- Конец пересылаемого сообщения --------</div> |
From: Stefan R. <Ste...@gm...> - 2017-05-01 16:39:50
|
Did you try to create a http://www.jython.org/javadoc/org/python/util/InteractiveInterpreter.html instead? (It's a subclass of PythonInterpreter, so features all of its methods too.) Then you can call interrupt on it, e.g. interrupt(Py.getThreadState()). (Disclaimer: Didn't try myself, so no idea if this works as expected.) Best -Stefan > Gesendet: Montag, 01. Mai 2017 um 16:31 Uhr > Von: "Тихомиров Валентин" <int...@ya...> > An: jyt...@li... > Betreff: [Jython-users] Can I cancel Pythoninterpreter's evaluation? > > I use some http://www.jython.org/javadoc/org/python/util/PythonInterpreter.html. It has methods to evaluate a script. What do you do for preliminary termination of the execution? > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Тихомиров В. <int...@ya...> - 2017-05-01 14:32:00
|
I use some http://www.jython.org/javadoc/org/python/util/PythonInterpreter.html. It has methods to evaluate a script. What do you do for preliminary termination of the execution? |
From: Fabio Z. <fa...@gm...> - 2017-04-12 11:15:23
|
PyDev 5.7.0 Release Highlights ------------------------------- * **Important** PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. * PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). * **PyLint** * The PyLint integration is much improved. * Working along with the PyDev code-analysis. * If there's an equivalent code analysis error in PyLint and PyDev, the PyLint one is hidden. * **Ctrl+1** on PyLint error line shows option to silent error in that line. * See: http://pydev.org/manual_adv_pylint.html for details. * **Debugger** * Fixed issue when sorting which could lead to error comparing a value with None. * Fixed issue which prevented debugger from working with Jython due to the lack of sys._current_frames. * Testing Jython on CI. * **Code Completion** * Properly unpacking assigns from a parameter to an instance with type documented in docstring. **#PyDev-778** * **Others** * When assigning parameters to attributes (**Ctrl+1** on function **def**), skip adding duplicate assignments. * When adding parameters to docstrings (**Ctrl+1** on function **def**), it will now properly update an existing docstring, not only create one from scratch. * In Windows, when searching executables, priority is given to a python executable found in the PATH (as in Mac/Linux). * Fixed issue were space was wrongly removed in code formatter. **#PyDev-784** What is PyDev? --------------------------- PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and IronPython development. It comes with goodies such as code completion, syntax highlighting, syntax analysis, code analysis, refactor, debug, interactive console, etc. Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com What is LiClipse? --------------------------- LiClipse is a PyDev standalone with goodies such as support for Multiple cursors, theming, TextMate bundles and a number of other languages such as Django Templates, Jinja2, Kivy Language, Mako Templates, Html, Javascript, etc. It's also a commercial counterpart which helps supporting the development of PyDev. Details on LiClipse: http://www.liclipse.com/ Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer LiClipse http://www.liclipse.com PyDev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com PyVmMonitor - Python Profiler http://www.pyvmmonitor.com/ |
From: Fabio Z. <fa...@gm...> - 2017-03-23 12:00:44
|
PyDev 5.6.0 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Debugger* - *Performance* enhancements on the *debugger* (which should be *60%-100%* faster now). - The *debugger* now only supports *Python 2.6 onwards* (keep on PyDev 5.5.0 for Python 2.5 or below). - Properly displaying variables when the *interactive console* is connected to a *debug session*. *#PyDev-776* - Providing a way for the debugger to support a user-specified version of Qt for debugging QThreads (*preferences > PyDev > Debug > Qt Threads*). - Fixed issue where a *native Qt signal is not callable* message was raised when connecting a signal to QThread.started. - Fixed issue in displaying variable (with *Ctrl+Shift+D*) when debugging. - Debug view toolbar icons no longer appearing stretched due to Set Next Statement icon having a different size. - *Code completion* - *super* is now properly recognized (code completion and find definition). - *pytest fixtures* are now properly recognized (code completion and find definition). - Suppress invalid completions on literals numbers (patch by Jonah Graham) - *Others* - It's now possible to save the PyUnit preferences to the project or user settings. - Upgraded *pep8* to the latest *pycodestyle*. - Upgraded to latest *autopep8*. - Fixed issue in Django shell if version >= 1.10 *#PyDev-752*. - Add support for *coverage 4.x* (minimum supported version is now 4.3). *#PyDev-691* - Syntax highlighting for *matmul operator* (was being considered a decorator). *#PyDev-771* - Making *PyLint* use the same thread pool used for code analysis. - String index out of range while reading buffer in AbstractShell. *#PyDev-768* What is PyDev? PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and IronPython development. It comes with goodies such as code completion, syntax highlighting, syntax analysis, code analysis, refactor, debug, interactive console, etc. Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com What is LiClipse? LiClipse is a PyDev standalone with goodies such as support for Multiple cursors, theming, TextMate bundles and a number of other languages such as Django Templates, Jinja2, Kivy Language, Mako Templates, Html, Javascript, etc. It's also a commercial counterpart which helps supporting the development of PyDev. Details on LiClipse: http://www.liclipse.com/ Cheers, -- Fabio Zadrozny ------------------------------ Software Developer LiClipse http://www.liclipse.com PyDev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com PyVmMonitor - Python Profiler http://www.pyvmmonitor.com/ |
From: Eugene K. <new...@gm...> - 2017-03-15 05:02:13
|
unsuscribe |
From: Curtis R. <ctr...@wi...> - 2017-03-14 19:00:38
|
Hi Fernando, > I have a friend who's coming from a Python background, and would like > to dabble in Jython. Are there any samples online for instance for > generating a simple Jython JAR that calls datepicker API to select a > certain date, then does something with that? The SciJava Jython script language plugin [1] supports a special parameter syntax, which lets you specify inputs of various types, including dates (harvested under the hood using JDatePicker). Here is a sample script: # @Date date print("You chose: " + str(date)) But that is not exactly vanilla Jython. I looked at calling JDatePicker directly, but it is a little involved since you have to set up your Swing components and such. Probably not the friendliest intro to Jython for your friend. Does it have to be date picking specifically? Regards, Curtis -- Curtis Rueden LOCI software architect - https://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden [1] https://github.com/scijava/scripting-jython On Wed, Mar 8, 2017 at 8:11 PM, Fernando Cassia <fc...@gm...> wrote: > Hi there, > > I have a friend who's coming from a Python background, and would like > to dabble in Jython. > Are there any samples online for instance for generating a simple > Jython JAR that calls datepicker API to select a certain date, then > does something with that? > > My intention is to encourage him to get into jython rather than to > scary him, to the simpler the sample code is, the better... > > For instance I told him to get Netbeans and the Jython plug-in, > although I'm not sure if the one on the Netbeans Plugins page works > well with 2.7x > > Thoughts? Comments? Thanks... > FC > > ------------------------------------------------------------ > ------------------ > Announcing the Oxford Dictionaries API! The API offers world-renowned > dictionary content that is easy and intuitive to access. Sign up for an > account today to start using our lexical data to power your apps and > projects. Get started today and enter our developer competition. > http://sdm.link/oxford > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Fernando C. <fc...@gm...> - 2017-03-09 02:11:56
|
Hi there, I have a friend who's coming from a Python background, and would like to dabble in Jython. Are there any samples online for instance for generating a simple Jython JAR that calls datepicker API to select a certain date, then does something with that? My intention is to encourage him to get into jython rather than to scary him, to the simpler the sample code is, the better... For instance I told him to get Netbeans and the Jython plug-in, although I'm not sure if the one on the Netbeans Plugins page works well with 2.7x Thoughts? Comments? Thanks... FC |
From: Peter O'R. <pr...@ya...> - 2017-02-21 18:55:31
|
This Jython code is failing, from com.ziclix.python.sql import zxJDBC try: conn = zxJDBC.connect("jdbc:oracle:thin:@myserver.com:1999:company",'APP_USR','password', "oracle.jdbc.driver.OracleDriver") c = conn.cursor() procedure = 'MySchema.SP_UPDATE_JOB_STAT' params=['134569','COMPLETED', 'TEST','TEST'] x=c.callproc('MySchema.SP_UPDATE_JOB_STAT', params=params) c.fetchall() c.close() except: instance = sys.exc_info()[1] print 'Exception = ' + (instance.args[0]) All I am trying to do is execute a stored proc, I can execute it from SQL Developer.. This is the error I get, Exception = ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SP_UPDATE_JOB_STAT' ORA-06550: line 1, column 7: PL/SQL: Statement ignored [SQLCode: 6550], [SQLState: 65000] Thanks,PR |
From: Jason S. <jm...@gm...> - 2017-02-08 16:28:35
|
I've got a Java application calling FreeMarker which can call methods on Jython objects, and would like to handle the case where there's a bug in my Jython code and somehow I have an infinite loop. This message from 2002 https://sourceforge.net/p/jython/mailman/message/10226687/ says --- A java thread running a jython interpreter is no more and no less than a java thread. Interrupting such a thread is just as difficult as interrupting a java thread, because the jython interpreter does not check for thread interrupted status. You might extend the interpreter to do this check, but then it would run slower. Since the interpreter can call any java code that does not necessarily check the interrupted status, such a check would not be a strong guarantee anyway. --- Is this still the case for Jython 2.5.3 and 2.7.0? |
From: Jeff A. <ja...@fa...> - 2017-02-07 21:19:08
|
That's great: you didn't have the heap problem. (I got the SSL warnings too.) Thanks for feeding back on your success. Jeff Allen On 07/02/2017 11:40, Thufir Hawat wrote: > Thanks for helping. Got it installed as: > > thufir@doge:~$ > thufir@doge:~$ jython --version > Jython 2.7.0 > thufir@doge:~$ > thufir@doge:~$ pip --version > pip 1.6.dev1 from /home/thufir/jython/Lib/site-packages (python 2.7) > thufir@doge:~$ > thufir@doge:~$ pip freeze > thufir@doge:~$ > thufir@doge:~$ pip install virtualenv > Downloading/unpacking virtualenv > Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB): 1.8MB > downloaded > Installing collected packages: virtualenv > Successfully installed virtualenv > Cleaning up... > thufir@doge:~$ > thufir@doge:~$ mkdir nfl > thufir@doge:~$ > thufir@doge:~$ cd nfl > thufir@doge:~/nfl$ > thufir@doge:~/nfl$ jython -m virtualenv jve > Cannot find file /home/thufir/jython/Include (bad symlink) > New jython executable in /home/thufir/nfl/jve/bin/jython > Installing setuptools, pip, wheel...done. > thufir@doge:~/nfl$ > thufir@doge:~/nfl$ . jve/bin/activate > (jve) thufir@doge:~/nfl$ > (jve) thufir@doge:~/nfl$ pip install nflgame > Collecting nflgame > /home/thufir/nfl/jve/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:310: > SNIMissingWarning: An HTTPS request has been made, but the SNI > (Subject Name Indication) extension to TLS is not available on this > platform. This may cause the server to present an incorrect TLS > certificate, which can cause validation failures. You can upgrade to a > newer version of Python to solve this. For more information, see > https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. > warnings.warn( > /home/thufir/nfl/jve/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:115: > InsecurePlatformWarning: A true SSLContext object is not available. > This prevents urllib3 from configuring SSL appropriately and may cause > certain SSL connections to fail. You can upgrade to a newer version of > Python to solve this. For more information, see > https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. > warnings.warn( > Downloading nflgame-1.2.20.tar.gz (34.0MB) > 100% |████████████████████████████████| 34.0MB 11kB/s > Collecting pytz (from nflgame) > Downloading pytz-2016.10-py2.py3-none-any.whl (483kB) > 100% |████████████████████████████████| 491kB 158kB/s > Collecting httplib2 (from nflgame) > Downloading httplib2-0.10.3.tar.gz (204kB) > 100% |████████████████████████████████| 204kB 136kB/s > Collecting beautifulsoup4 (from nflgame) > Downloading beautifulsoup4-4.5.3-py2-none-any.whl (85kB) > 100% |████████████████████████████████| 92kB 147kB/s > Building wheels for collected packages: nflgame, httplib2 > Running setup.py bdist_wheel for nflgame ... done > Stored in directory: > /home/thufir/.cache/pip/wheels/12/e2/67/97dfa7f48af53140aa18136c8fbf019c455600b00b6cd4f07d > Running setup.py bdist_wheel for httplib2 ... done > Stored in directory: > /home/thufir/.cache/pip/wheels/ca/ac/5f/749651f7925b231103f5316cacca82a487810c22d30f011c0c > Successfully built nflgame httplib2 > Installing collected packages: pytz, httplib2, beautifulsoup4, nflgame > Successfully installed beautifulsoup4-4.5.3 httplib2-0.10.3 > nflgame-1.2.20 pytz-2016.10 > (jve) thufir@doge:~/nfl$ > (jve) thufir@doge:~/nfl$ pip freeze > appdirs==1.4.0 > beautifulsoup4==4.5.3 > httplib2==0.10.3 > nflgame==1.2.20 > packaging==16.8 > pyparsing==2.1.10 > pytz==2016.10 > six==1.10.0 > (jve) thufir@doge:~/nfl$ > > > > so that looks good. > > > > > thanks, > > Thufir > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Thufir H. <haw...@gm...> - 2017-02-07 11:40:46
|
Thanks for helping. Got it installed as: thufir@doge:~$ thufir@doge:~$ jython --version Jython 2.7.0 thufir@doge:~$ thufir@doge:~$ pip --version pip 1.6.dev1 from /home/thufir/jython/Lib/site-packages (python 2.7) thufir@doge:~$ thufir@doge:~$ pip freeze thufir@doge:~$ thufir@doge:~$ pip install virtualenv Downloading/unpacking virtualenv Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB): 1.8MB downloaded Installing collected packages: virtualenv Successfully installed virtualenv Cleaning up... thufir@doge:~$ thufir@doge:~$ mkdir nfl thufir@doge:~$ thufir@doge:~$ cd nfl thufir@doge:~/nfl$ thufir@doge:~/nfl$ jython -m virtualenv jve Cannot find file /home/thufir/jython/Include (bad symlink) New jython executable in /home/thufir/nfl/jve/bin/jython Installing setuptools, pip, wheel...done. thufir@doge:~/nfl$ thufir@doge:~/nfl$ . jve/bin/activate (jve) thufir@doge:~/nfl$ (jve) thufir@doge:~/nfl$ pip install nflgame Collecting nflgame /home/thufir/nfl/jve/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:310: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. warnings.warn( /home/thufir/nfl/jve/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:115: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. warnings.warn( Downloading nflgame-1.2.20.tar.gz (34.0MB) 100% |████████████████████████████████| 34.0MB 11kB/s Collecting pytz (from nflgame) Downloading pytz-2016.10-py2.py3-none-any.whl (483kB) 100% |████████████████████████████████| 491kB 158kB/s Collecting httplib2 (from nflgame) Downloading httplib2-0.10.3.tar.gz (204kB) 100% |████████████████████████████████| 204kB 136kB/s Collecting beautifulsoup4 (from nflgame) Downloading beautifulsoup4-4.5.3-py2-none-any.whl (85kB) 100% |████████████████████████████████| 92kB 147kB/s Building wheels for collected packages: nflgame, httplib2 Running setup.py bdist_wheel for nflgame ... done Stored in directory: /home/thufir/.cache/pip/wheels/12/e2/67/97dfa7f48af53140aa18136c8fbf019c455600b00b6cd4f07d Running setup.py bdist_wheel for httplib2 ... done Stored in directory: /home/thufir/.cache/pip/wheels/ca/ac/5f/749651f7925b231103f5316cacca82a487810c22d30f011c0c Successfully built nflgame httplib2 Installing collected packages: pytz, httplib2, beautifulsoup4, nflgame Successfully installed beautifulsoup4-4.5.3 httplib2-0.10.3 nflgame-1.2.20 pytz-2016.10 (jve) thufir@doge:~/nfl$ (jve) thufir@doge:~/nfl$ pip freeze appdirs==1.4.0 beautifulsoup4==4.5.3 httplib2==0.10.3 nflgame==1.2.20 packaging==16.8 pyparsing==2.1.10 pytz==2016.10 six==1.10.0 (jve) thufir@doge:~/nfl$ so that looks good. thanks, Thufir |
From: Fabio Z. <fa...@gm...> - 2017-01-31 17:18:10
|
PyDev 5.5.0 Release Highlights ------------------------------- * **Important** PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. * PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). * If you enjoy PyDev, you can help in keeping it supported through its Patreon crowdfunding: https://www.patreon.com/fabioz. * **Refactoring** * Fixed refactoring error when dealing with imports which have a continuation char inside the module name part. **#PyDev-712** * When extracting a method, decorators are properly considered for the new method position. **#PyDev-321** * **Code completion** * When accessing enums, 'value' and 'name' are properly found. **#PyDev-591** * Code completion improved on method chaining. **#PyDev-636** and **#PyDev-583** * It's now possible to choose whether when a code-completion which adds a local import should add the import to the beginning of the function or the line above where it was requested. * It may be configured in the preferences (Preferences > PyDev > Editor > Code Completion > Put local imports on top of method?). * Default was changed to add it to the top of the method. * **New actions** * **Ctrl+Shift+Alt+O** can be used to open the last hyperlink in the console that's currently open (it's now possible to jump directly to the error in some exception). **#PyDev-755** * **Ctrl+2,sw** switches the target and value in assign statements (may not work properly if more than one '=' is found in the line). * **Debugger** * Fixed error when hovering over variable when debugging. **#PyDev-580** * **Others** * Fixed issue in grammar parsing on nested async calls. **#PyDev-753** * Fixed issue grouping imports when an import has a continuation char inside the module part. **#PyDev 712** What is PyDev? --------------------------- PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and IronPython development. It comes with goodies such as code completion, syntax highlighting, syntax analysis, code analysis, refactor, debug, interactive console, etc. Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com What is LiClipse? --------------------------- LiClipse is a PyDev standalone with goodies such as support for Multiple cursors, theming, TextMate bundles and a number of other languages such as Django Templates, Jinja2, Kivy Language, Mako Templates, Html, Javascript, etc. It's also a commercial counterpart which helps supporting the development of PyDev. Details on LiClipse: http://www.liclipse.com/ Cheers, -- Fabio Zadrozny ------------------------------------------------------ Software Developer LiClipse http://www.liclipse.com PyDev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com PyVmMonitor - Python Profiler http://www.pyvmmonitor.com/ |
From: Jeff A. <ja...@fa...> - 2017-01-19 18:38:32
|
Hi Thufir, There is quite good support for pip beginning Jython 2.7 on Linux, for which I believe we have to thank Jim Baker. You want a 2.7 version of Python anyway, because nflgame (nfldb) offers to work only with 2.6 or 2.7. For a start, it uses str.format, and I think I'm correct in saying that it wasn't available in 2.5. Thanks for trying this with Jython: I tried this for myself and got a little further than you. I have Jython 2.7.0 installed at ~/Jython2.7.0 (so I don't need root), but I thought I'd see in virtualenv worked for me, since I've little lasting interest in football. I made this work on Linux Mint: 1. Put the Jython bin directory first on your path ("export PATH=~/Jython2.7.0/bin"), and check using which pip that you get Jython's version of pip. 2. "pip install virtualenv" will give you virtualenv in your (home) jython installation. 3. Now cd to where you want to work and "jython -m virtualenv jve" will install you an environment called jve. 4. ". jve/bin/activate" will activeate it (note it is "bin" not "Scripts"). Now "which pip" should show an executable in the virtual environment. 5 "pip install nflgame" starts well, but here I ran out of heap space. :( You may have better luck: my Linux laptop is quite small. I was able to install gallows (a small console game) the same way, without the heap problem, although for some reason gallows.py landed in the bin directory, not in site-packages. After moving the file, the game worked. Sorry this is not a canned solution, but maybe this gets you onto more interesting problems. Jeff Allen On 17/01/2017 12:39, Thufir wrote: > Exactly the problem. How do I install PIP packages with Jython? > > > > > thufir@doge:~/NetBeansProjects/nfl$ > thufir@doge:~/NetBeansProjects/nfl$ which pip > /home/thufir/.local/bin//pip > thufir@doge:~/NetBeansProjects/nfl$ > thufir@doge:~/NetBeansProjects/nfl$ pip -V > pip 9.0.1 from /home/thufir/.local/lib/python2.7/site-packages (python 2.7) > thufir@doge:~/NetBeansProjects/nfl$ > thufir@doge:~/NetBeansProjects/nfl$ cat /etc/lsb-release > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=16.04 > DISTRIB_CODENAME=xenial > DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" > thufir@doge:~/NetBeansProjects/nfl$ > thufir@doge:~/NetBeansProjects/nfl$ jython -V > "my" variable $jythonHome masks earlier declaration in same scope at > /usr/bin/jython line 15. > Jython 2.5.3 > thufir@doge:~/NetBeansProjects/nfl$ > > > > > thanks, > > Thufir > > On 1/16/17, Debabrata Pani <deb...@gm...> wrote: >> Hi Thufir, >> >> Can you share the output of "which pip" command ? >> Probably nflgame is installed with "python" and not with "jython" >> >> Regards, >> Debabrata Pani >> >> On Tue, Jan 17, 2017 at 12:20 AM, Thufir Hawat <haw...@gm...> >> wrote: >> >>> Fairly basic usage, but how do I use PIP from Jython? The package is >>> installed: >>> >>> >>> >>> thufir@doge:~/jython$ >>> thufir@doge:~/jython$ jython nfl.py >>> "my" variable $jythonHome masks earlier declaration in same scope at >>> /usr/bin/jython line 15. >>> Traceback (most recent call last): >>> File "nfl.py", line 2, in <module> >>> import nflgame >>> ImportError: No module named nflgame >>> thufir@doge:~/jython$ >>> thufir@doge:~/jython$ pip show nflgame >>> Name: nflgame >>> Version: 1.2.20 >>> Summary: An API to retrieve and read NFL Game Center JSON data. It can >>> work with real-time data, which can be used for fantasy football. >>> Home-page: https://github.com/BurntSushi/nflgame >>> Author: Andrew Gallant >>> Author-email: an...@bu... >>> License: UNLICENSE >>> Location: /home/thufir/.local/lib/python2.7/site-packages >>> Requires: beautifulsoup4, pytz, httplib2 >>> thufir@doge:~/jython$ >>> thufir@doge:~/jython$ cat nfl.py >>> #!python >>> import nflgame >>> >>> games = nflgame.games(2013, week=1) >>> players = nflgame.combine_game_stats(games) >>> for p in players.rushing().sort('rushing_yds').limit(5): >>> msg = '%s %d carries for %d yards and %d TDs' >>> print msg % (p, p.rushing_att, p.rushing_yds, p.rushing_tds) >>> >>> >>> >>> thufir@doge:~/jython$ >>> >>> >>> >>> >>> >>> thanks, >>> >>> Thufir >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users >>> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Thufir <haw...@gm...> - 2017-01-17 12:39:30
|
Exactly the problem. How do I install PIP packages with Jython? thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ which pip /home/thufir/.local/bin//pip thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ pip -V pip 9.0.1 from /home/thufir/.local/lib/python2.7/site-packages (python 2.7) thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ jython -V "my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15. Jython 2.5.3 thufir@doge:~/NetBeansProjects/nfl$ thanks, Thufir On 1/16/17, Debabrata Pani <deb...@gm...> wrote: > Hi Thufir, > > Can you share the output of "which pip" command ? > Probably nflgame is installed with "python" and not with "jython" > > Regards, > Debabrata Pani > > On Tue, Jan 17, 2017 at 12:20 AM, Thufir Hawat <haw...@gm...> > wrote: > >> Fairly basic usage, but how do I use PIP from Jython? The package is >> installed: >> >> >> >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ jython nfl.py >> "my" variable $jythonHome masks earlier declaration in same scope at >> /usr/bin/jython line 15. >> Traceback (most recent call last): >> File "nfl.py", line 2, in <module> >> import nflgame >> ImportError: No module named nflgame >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ pip show nflgame >> Name: nflgame >> Version: 1.2.20 >> Summary: An API to retrieve and read NFL Game Center JSON data. It can >> work with real-time data, which can be used for fantasy football. >> Home-page: https://github.com/BurntSushi/nflgame >> Author: Andrew Gallant >> Author-email: an...@bu... >> License: UNLICENSE >> Location: /home/thufir/.local/lib/python2.7/site-packages >> Requires: beautifulsoup4, pytz, httplib2 >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ cat nfl.py >> #!python >> import nflgame >> >> games = nflgame.games(2013, week=1) >> players = nflgame.combine_game_stats(games) >> for p in players.rushing().sort('rushing_yds').limit(5): >> msg = '%s %d carries for %d yards and %d TDs' >> print msg % (p, p.rushing_att, p.rushing_yds, p.rushing_tds) >> >> >> >> thufir@doge:~/jython$ >> >> >> >> >> >> thanks, >> >> Thufir >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> > |
From: Thufir <haw...@gm...> - 2017-01-17 12:36:49
|
Yes, I'll take a look at the --path option, that makes sense. Thanks, thufir thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ which pip /home/thufir/.local/bin//pip thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ pip -V pip 9.0.1 from /home/thufir/.local/lib/python2.7/site-packages (python 2.7) thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ jython -V "my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15. Jython 2.5.3 thufir@doge:~/NetBeansProjects/nfl$ On 1/16/17, Stefan Richthofer <Ste...@gm...> wrote: > Thufir, I may not be the ideal guide for pip etc on Jython, because I always > use the dev-versions of packages with Jython, setting up import-path by hand > (so I can directly debug stuff). So far I never used pip or ez_setup to > properly install packages for Jython, though it's said to work well. That > said, you should > > - consider to use the --prefix option to select a custom install-path (see > pip doc) > - be aware that installing packages with pip or similar tools without > --prefix normally requires root-access, also with CPython > - better not mix CPython and Jython package installation paths: > Your log mentions /usr/local/lib/python2.7/dist-packages, which is a > location for CPython-stuff. > That's probably why Jython cannot find packages installed there: It > doesn't have it on jython-path by default. > Maybe the right Jython location should be > /usr/local/lib/jython2.7/dist-packages (not sure... maybe jythonbook > knows...?) > (Again: You can choose a custom location using --prefix) > > Hope this somewhat helps. > > Stefan > > >> Gesendet: Montag, 16. Januar 2017 um 22:55 Uhr >> Von: "Thufir Hawat" <haw...@gm...> >> An: jyt...@li... >> Betreff: [Jython-users] sudo jython ez_setup.py >> >> Is it typical to have to resort to sudo to install ez_setup.py? This is >> following quite closely to the Jython book: >> >> http://www.jython.org/jythonbook/en/1.0/appendixA.html >> >> >> Because of root permissions, nearly everything must be done with root. On >> >> top of that, yolk, I don't think, is running. I suppose this is where >> virtual environments are handy? >> >> >> see attached sudo.txt pls. >> >> >> >> >> thanks, >> >> Thufir------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! >> http://sdm.link/slashdot_______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> > |
From: Debabrata P. <deb...@gm...> - 2017-01-17 02:16:33
|
Hi Thufir, Can you share the output of "which pip" command ? Probably nflgame is installed with "python" and not with "jython" Regards, Debabrata Pani On Tue, Jan 17, 2017 at 12:20 AM, Thufir Hawat <haw...@gm...> wrote: > Fairly basic usage, but how do I use PIP from Jython? The package is > installed: > > > > thufir@doge:~/jython$ > thufir@doge:~/jython$ jython nfl.py > "my" variable $jythonHome masks earlier declaration in same scope at > /usr/bin/jython line 15. > Traceback (most recent call last): > File "nfl.py", line 2, in <module> > import nflgame > ImportError: No module named nflgame > thufir@doge:~/jython$ > thufir@doge:~/jython$ pip show nflgame > Name: nflgame > Version: 1.2.20 > Summary: An API to retrieve and read NFL Game Center JSON data. It can > work with real-time data, which can be used for fantasy football. > Home-page: https://github.com/BurntSushi/nflgame > Author: Andrew Gallant > Author-email: an...@bu... > License: UNLICENSE > Location: /home/thufir/.local/lib/python2.7/site-packages > Requires: beautifulsoup4, pytz, httplib2 > thufir@doge:~/jython$ > thufir@doge:~/jython$ cat nfl.py > #!python > import nflgame > > games = nflgame.games(2013, week=1) > players = nflgame.combine_game_stats(games) > for p in players.rushing().sort('rushing_yds').limit(5): > msg = '%s %d carries for %d yards and %d TDs' > print msg % (p, p.rushing_att, p.rushing_yds, p.rushing_tds) > > > > thufir@doge:~/jython$ > > > > > > thanks, > > Thufir > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Stefan R. <Ste...@gm...> - 2017-01-17 01:29:21
|
Thufir, I may not be the ideal guide for pip etc on Jython, because I always use the dev-versions of packages with Jython, setting up import-path by hand (so I can directly debug stuff). So far I never used pip or ez_setup to properly install packages for Jython, though it's said to work well. That said, you should - consider to use the --prefix option to select a custom install-path (see pip doc) - be aware that installing packages with pip or similar tools without --prefix normally requires root-access, also with CPython - better not mix CPython and Jython package installation paths: Your log mentions /usr/local/lib/python2.7/dist-packages, which is a location for CPython-stuff. That's probably why Jython cannot find packages installed there: It doesn't have it on jython-path by default. Maybe the right Jython location should be /usr/local/lib/jython2.7/dist-packages (not sure... maybe jythonbook knows...?) (Again: You can choose a custom location using --prefix) Hope this somewhat helps. Stefan > Gesendet: Montag, 16. Januar 2017 um 22:55 Uhr > Von: "Thufir Hawat" <haw...@gm...> > An: jyt...@li... > Betreff: [Jython-users] sudo jython ez_setup.py > > Is it typical to have to resort to sudo to install ez_setup.py? This is > following quite closely to the Jython book: > > http://www.jython.org/jythonbook/en/1.0/appendixA.html > > > Because of root permissions, nearly everything must be done with root. On > top of that, yolk, I don't think, is running. I suppose this is where > virtual environments are handy? > > > see attached sudo.txt pls. > > > > > thanks, > > Thufir------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Thufir H. <haw...@gm...> - 2017-01-16 21:55:24
|
Is it typical to have to resort to sudo to install ez_setup.py? This is following quite closely to the Jython book: http://www.jython.org/jythonbook/en/1.0/appendixA.html Because of root permissions, nearly everything must be done with root. On top of that, yolk, I don't think, is running. I suppose this is where virtual environments are handy? see attached sudo.txt pls. thanks, Thufir |
From: Thufir H. <haw...@gm...> - 2017-01-16 19:09:57
|
Stefan, thanks for the help. What if I write a Python script which imports nfldb, and then pass messages to that script through PythonInterpreter? For the first iteration of this gateway, I'd just send raw python...if that's even possible. Hopefully that was coherent, Thufir On Sun, 15 Jan 2017, Stefan Richthofer wrote: > Thufir, > > there are basically two options, depending how close Java-intergation of the API you need. > > -If you have only a specific use-case you can use PythonInterpreter to execute python-code > that performs the desired operation. PythonInterpreter-API also allows you to retrieve values > for further processing in Java. > > -If you'd like to have Java-API-like access to a Python-API (e.g. that of nfldb), you need to > write a Java-interface that acts like a header to that Python-API, adding Java > type-information to it. So far you can only target Python-methods, i.e. no direct field-access. > In Jython 2.7.1b3 or newer, use Py.newJ or PyModule.newJ method family to instanciate Python- > objects under such Java-interface. > Page 45+ of https://arxiv.org/pdf/1607.00825v1.pdf contain examples using that technique (although > these are JyNI examples, the principle is applicable to plain Python-code as well). > Prior to 2.7.1b3 you would need to write glue-code in Python, that extends your Java-interface. > See http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications > for further example, especially the approach with glue-code. > > Given you mention JNI, I wouldn't see how that could help here. nfldb seems to contain no C-part. > > Feel free to ask again in more detail if you stuck on either approach. > > Best > > Stefan > > >> Gesendet: Sonntag, 15. Januar 2017 um 18:45 Uhr >> Von: "Thufir Hawat" <haw...@gm...> >> An: Jyt...@li... >> Betreff: [Jython-users] hook into nfldb with PythonInterpreter? >> >> I'm very new to Python and Jython, but installed nfldb from >> >> pip install --user nfldb >> >> which is on github: >> >> https://github.com/BurntSushi/nfldb/wiki/More-examples >> >> >> Coming at this from Java, how would I hook into nfldb with Java? Or, >> perhaps, run the code in Jython? >> >> I'm sure there's a general solution or approach, would appreciate any >> pointers. Perhaps simply using JNI to leverage the work that's gone into >> this library already. >> >> It looks like probably org.python.util.PythonInterpreter is the best way >> to invoke this library? I've seen examples of how to invoke a specific >> script, but this API is a bit larger. How would I hook into an API? >> >> >> >> >> thanks, >> >> Thufir >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Developer Access Program for Intel Xeon Phi Processors >> Access to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> > |
From: Thufir H. <haw...@gm...> - 2017-01-16 18:50:28
|
Fairly basic usage, but how do I use PIP from Jython? The package is installed: thufir@doge:~/jython$ thufir@doge:~/jython$ jython nfl.py "my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15. Traceback (most recent call last): File "nfl.py", line 2, in <module> import nflgame ImportError: No module named nflgame thufir@doge:~/jython$ thufir@doge:~/jython$ pip show nflgame Name: nflgame Version: 1.2.20 Summary: An API to retrieve and read NFL Game Center JSON data. It can work with real-time data, which can be used for fantasy football. Home-page: https://github.com/BurntSushi/nflgame Author: Andrew Gallant Author-email: an...@bu... License: UNLICENSE Location: /home/thufir/.local/lib/python2.7/site-packages Requires: beautifulsoup4, pytz, httplib2 thufir@doge:~/jython$ thufir@doge:~/jython$ cat nfl.py #!python import nflgame games = nflgame.games(2013, week=1) players = nflgame.combine_game_stats(games) for p in players.rushing().sort('rushing_yds').limit(5): msg = '%s %d carries for %d yards and %d TDs' print msg % (p, p.rushing_att, p.rushing_yds, p.rushing_tds) thufir@doge:~/jython$ thanks, Thufir |
From: Stefan R. <Ste...@gm...> - 2017-01-15 21:52:37
|
Thufir, there are basically two options, depending how close Java-intergation of the API you need. -If you have only a specific use-case you can use PythonInterpreter to execute python-code that performs the desired operation. PythonInterpreter-API also allows you to retrieve values for further processing in Java. -If you'd like to have Java-API-like access to a Python-API (e.g. that of nfldb), you need to write a Java-interface that acts like a header to that Python-API, adding Java type-information to it. So far you can only target Python-methods, i.e. no direct field-access. In Jython 2.7.1b3 or newer, use Py.newJ or PyModule.newJ method family to instanciate Python- objects under such Java-interface. Page 45+ of https://arxiv.org/pdf/1607.00825v1.pdf contain examples using that technique (although these are JyNI examples, the principle is applicable to plain Python-code as well). Prior to 2.7.1b3 you would need to write glue-code in Python, that extends your Java-interface. See http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications for further example, especially the approach with glue-code. Given you mention JNI, I wouldn't see how that could help here. nfldb seems to contain no C-part. Feel free to ask again in more detail if you stuck on either approach. Best Stefan > Gesendet: Sonntag, 15. Januar 2017 um 18:45 Uhr > Von: "Thufir Hawat" <haw...@gm...> > An: Jyt...@li... > Betreff: [Jython-users] hook into nfldb with PythonInterpreter? > > I'm very new to Python and Jython, but installed nfldb from > > pip install --user nfldb > > which is on github: > > https://github.com/BurntSushi/nfldb/wiki/More-examples > > > Coming at this from Java, how would I hook into nfldb with Java? Or, > perhaps, run the code in Jython? > > I'm sure there's a general solution or approach, would appreciate any > pointers. Perhaps simply using JNI to leverage the work that's gone into > this library already. > > It looks like probably org.python.util.PythonInterpreter is the best way > to invoke this library? I've seen examples of how to invoke a specific > script, but this API is a bit larger. How would I hook into an API? > > > > > thanks, > > Thufir > > > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |