-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to Python 3 #3
base: master
Are you sure you want to change the base?
Conversation
I really appreciate this, but I don't have the time to continue work on this. I mean, I've done nothing to it for months. More than a year now. And I don't think I'll ever continue on it because WHOIS servers are a bloody nightmare. But thank you for the effort! |
And I do really appreciate your work! I agree that WHOIS is far from ideal. Probably there is no incentive for registrars to stick to a standard output format. |
use with statement when working with files as this handles closing them correctly
refactor: use with statement
Make the regex in parse.reprocess_regex work with Python 3.7+ Remove unnecessary calls to encode('utf-8') Remove the Python 2 version of parse.is_string
Refer to python3 in the #! of whois-oracle.py Replace references to pwhois with whois-oracle in the README.
There are two changes needed to make the code run on Python 3.
One is using
configparse
instead ofConfigParse
and the other is usingitems()
instead ofiteritems()
(it should work on Python 2 too.)Unfortunately the new code won't run on Python 2.
Maybe it can become cross platform by following the advice at http://python-future.org/compatible_idioms.html#configparser