krf/supybot-lastfm — pull request #7 by GLolol (2014-11-15 03:21:30+00:00)
Title: Add Python 3 support and move API Key to config

Some notes:
- This replaces use of urllib2 (which only exists on Python 2) with Supybot's built-in `utils.web.getUrlFd`, which is essentially a version-independent wrapper around it.
- This uses the `from __future__ import unicode_literals` feature from Python 2.6+, allowing all text to be handled as Unicode without having to use `encode()` (Python 3 does this already, but Python 2 does not).
- Import structure in `__init__.py` and `test.py` are updated to reflect Python 3's dropping of implicit relative imports (the new syntax works fine on Python 2).
- `test.py` will now load API Keys from an environment variable named `lastfm_apikey`.