rwl/PYPOWER — pull request #9 by sscherfke (2014-04-04 08:41:35+00:00)
Title: Adding support for Python 3.

PYPOWER should now work on Python 2 and 3 with the same codebase. I tested it
with 2.7 and 3., but 2.6 and 3.3 should also work. I don’t think support for older
Python versions is still necessary.

I couldn’t run all tests, because that also wasn’t possible with v4.0.1, but
all tests that passed with 4.0.1 are still passing. I also performed some
power flow computations and they also worked fine.

I didn’t apply all changes 2to3 suggested. The remaining ones are in
https://gist.github.com/sscherfke/9970540 (just in case ...).

These are the most frequent changes I had to apply:
- `print 'spam'` --> `print('spam')` (`print` is a function, `exec`, too)
- `raise Exception, 'value'` --> `raise Exception('value')` (new Syntax for exceptions)
- `from mod import fcn` --> `from pypower.mod import fcn` (absolute/relative imports)
- There is no more `basestring` in Py3. Set `basestring = str` here.