michkaravolos / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

Python 3 support with android.py #545

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was following http://code.google.com/p/android-scripting/wiki/RemoteControl 
page, and android.py didn't work for me because of my Python version. But I can 
make it run with only 2 lines of change. Just change line 34 on 
"http://android-scripting.googlecode.com/hg/python/ase/android.py" to:
    self.client = self.conn.makefile(mode="rw")
and line 50 to:
      print(result['error'])
It didn't break script with Python2.7 too, didn't tried older versions. It 
would be good if It supports Python3 default.

Original issue reported on code.google.com by utde...@gmail.com on 15 May 2011 at 3:40

GoogleCodeExporter commented 9 years ago
Would you mind providing a proper patch so we can apply?

Original comment by naranjo....@gmail.com on 15 May 2011 at 9:16

GoogleCodeExporter commented 9 years ago
I don't know how to create a patch. Here is the new file:

(I also noticed importing sys is unnecessary)

Original comment by utde...@gmail.com on 17 May 2011 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
This is a cool idea, but belongs over in 
http://code.google.com/p/python-for-android/

Original comment by rjmatthews62 on 22 Aug 2011 at 12:07