Updated pyrc to work with python 3. Not fully tested yet!