dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.62k stars 347 forks source link

Update viewclient.py #158

Closed CallMeZack closed 8 years ago

CallMeZack commented 8 years ago

if it should be this?cause this place has errors in my workspace.

dtmilano commented 8 years ago

Which OS and python version are you using?

dtmilano commented 8 years ago

I think it's much safer the way you suggest, however the only case that would be affected is when there's only numbers inside the {}.

>>> r = re.compile('A{2}')
>>> print r.match('A{2}')
None
>>> print r.match('AA')
<_sre.SRE_Match object at 0x109b72b28>
>>> r = re.compile('A\{2\}')
>>> print r.match('AA')
None
>>> print r.match('A{2}')
<_sre.SRE_Match object at 0x109b72b28>
CallMeZack commented 8 years ago

My os is windows7 64bit, python is 2.7.5 32 bit on win32; I got the errors' warning in IDE PyCharm