Thufir Hawat
2017-01-16 18:50:19 UTC
Fairly basic usage, but how do I use PIP from Jython? The package is
installed:
***@doge:~/jython$
***@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
***@doge:~/jython$
***@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: ***@burntsushi.net
License: UNLICENSE
Location: /home/thufir/.local/lib/python2.7/site-packages
Requires: beautifulsoup4, pytz, httplib2
***@doge:~/jython$
***@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)
***@doge:~/jython$
thanks,
Thufir
installed:
***@doge:~/jython$
***@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
***@doge:~/jython$
***@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: ***@burntsushi.net
License: UNLICENSE
Location: /home/thufir/.local/lib/python2.7/site-packages
Requires: beautifulsoup4, pytz, httplib2
***@doge:~/jython$
***@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)
***@doge:~/jython$
thanks,
Thufir