scottrice / pysteam

Python API for accessing local Steam information
MIT License
24 stars 21 forks source link

Python 3 compatibility #3

Closed rwesterlund closed 9 years ago

rwesterlund commented 9 years ago

The user module was removed in Python 3 so steam.py fails. There isn't much more information about other than the fact that it's removed. The functionality does not seem to be replicated in the compatibility library six either. I have no idea how to fix it.

rwesterlund commented 9 years ago

Never mind, it was a local module. I've been able to get Ice & pysteam working with Python 3.

scottrice commented 9 years ago

What was involved in making it Python 3 compatible? I haven't looked at comparability at all, but is it possible to have a single code base that works with Python 2.7 and Python 3? That's what I would like to do ideally.

rwesterlund commented 9 years ago

Most of it was changing relative imports into absolute imports, print function, removing the raw prefix from strings (not sure how this turns out with Py2.7). filter and map return iterators so they cause a few issues if the results are reused, adding with a list or introducing side effects without consuming the iterator.

I've written my code to support both 2.7 and 3 but I don't think I have 2.7 installed anymore so I haven't been able to test it. Looking over the code I seem to have overwritten something from previous commit and I need to run the tests to see if the work in 3 but I could make a pull request after tidying if you'd like.

scottrice commented 9 years ago

If you make a version that runs in both 2.7 and 3 that would be fantastic. That seems like something that would break easily though, so we should probably include a way to run the unit tests using python3 as well.

unknownclient commented 9 years ago

I am new to Git Hub, I have no coding experience at all. But I would like to thank you for creating ICE. Is there anyway to donate to the work you are doing on ICE? I am very grateful for what you and the community have done here. I realize this might not be the best place to post this, but I did not find a way to donate, and I would like to contribute in some way. Even if its just to say, a BIG thank you for bringing steam and emulation together.