Skip to content
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

python3 support #15

Open
a358003542 opened this issue Jan 28, 2015 · 2 comments
Open

python3 support #15

a358003542 opened this issue Jan 28, 2015 · 2 comments

Comments

@a358003542
Copy link

I am not master of python , modified this now can run under python3 ,

webkit_server.py line124:
raise NodeError, "Unselect not allowed."

changed to
raise NodeError("Unselect not allowed.")

the same line 401:
raise NoX11Error("Cannot connect to X. You can try running with xvfb-run.")
the same line 462:
raise NoResponseError("No response received from server.")
the same line 465:
raise InvalidResponseError(self._read_message())
the same line 484:
raise EndOfStreamError("Unexpected end of stream.")

  1. line 399
    self._port = int(re.search("port: (\d+)", output.decode()).group(1))
  2. send bytes
    line 454
    self._sock.send(bytes(arg,'utf-8'))

line 502
self._sock.send(bytes(line + "\n",'utf-8'))#

  1. recv decode
    line 495
    c = c.decode('utf-8')#
  2. line 487
    return b''.join(result)#
@niklasb
Copy link
Owner

niklasb commented Jan 28, 2015

Do you want to open a pull request for the changes? It would be nice to have a version that works with 2.7 as well as 3.4

@a358003542
Copy link
Author

in fact i am not good at about the transport problem about python2 to
python3. i will do the modification of the raise error part , but last
decode and encode and bytes and str problem , i am a little comfuse about
that so i will not modified.

2015-01-28 19:22 GMT+08:00 Niklas Baumstark [email protected]:

Do you want to open a pull request for the changes? It would be nice to
have a version that works with 2.7 as well as 3.4


Reply to this email directly or view it on GitHub
#15 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants