Client.py - StringIO is deprecated in Python 3 + a suggestion
Closed this issue · 2 comments
The following code is from the server script. You may want to add to the client script or do the replacements listed.
I don't know if io works with older python versions, so for dual compatibility, the 'try' code may be better. Unfortunately, there's no 'PyVer' version reconciliation module to treat compatibility issues.
Seems like a 'no brainer'.
CODE
try:
from StringIO import StringIO
except ImportError:
python3 = True
import io as bytesIOModule
END CODE
Replace :
storage = StrinIO.StrinIO()
with :
storage = io.BytesIO()
and
import io instead of StringIO
additionally
add parentheses for print statement.
The suggestion:
if possible, add the section on Google's return page, entitlesd "Pages that include matching images."
This would create the possibility of searching for larger format images, e.x. 2048x1024.
Hi jimlynnjulian,
Thanks for the details, I'll put that on my todo list and take a look at adding the code along with the "Pages that include matching images." section.
Thanks again.
@jimlynnjulian @vivithemage
I did it and made a pull request please have a look at it.