Skip to content

Commit 818c4b5

Browse files
committed
Removed sys.path manipulation not needed for python
- Version 4.5.2 - Restores snake whitespaces
1 parent 34aa985 commit 818c4b5

2 files changed

Lines changed: 8 additions & 35 deletions

File tree

AndroidViewClient/tools/culebra

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ Created on Mar 28, 2013
77
Culebra helps you create AndroidViewClient scripts generating a working template that can be
88
modified to suit more specific needs.
99
__ __ __ __
10-
/ \ / \ / \ / \
10+
/ \ / \ / \ / \
1111
____________________/ __\/ __\/ __\/ __\_____________________________
1212
___________________/ /__/ /__/ /__/ /________________________________
1313
| / \ / \ / \ / \ \___
14-
|/ \_/ \_/ \_/ \ o \
14+
|/ \_/ \_/ \_/ \ o \
1515
\_____/--<
1616
@author: Diego Torres Milano
1717
@author: Jennifer E. Swofford (ascii art snake)
1818
1919
'''
2020

21-
__version__ = '4.2.3'
21+
__version__ = '4.5.2'
2222

2323
import re
2424
import sys
@@ -29,14 +29,6 @@ import subprocess
2929
import codecs
3030
from datetime import date
3131

32-
# PyDev sets PYTHONPATH, use it
33-
try:
34-
for p in os.environ['PYTHONPATH'].split(':'):
35-
if not p in sys.path:
36-
sys.path.append(p)
37-
except:
38-
pass
39-
4032
try:
4133
sys.path.append(os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
4234
except:
@@ -90,7 +82,7 @@ OPTS_HELP = {
9082
'd': 'whether to use findViewWithContentDescription',
9183
'r': 'use regexps in matches',
9284
'U': 'generates unit test script',
93-
'j': 'use jar and appropriate shebang to run script',
85+
'j': 'use jar and appropriate shebang to run script (deprecated)',
9486
'D': 'use a dictionary to store the Views found',
9587
'K': 'dictionary keys from: id, text, content-description',
9688
'R': 'auto regexps (i.e. clock)',
@@ -396,11 +388,11 @@ Copyright (C) 2013 Diego Torres Milano
396388
Created on %s by Culebra v%s
397389
398390
__ __ __ __
399-
/ \ / \ / \ / \
391+
/ \ / \ / \ / \
400392
____________________/ __\/ __\/ __\/ __\_____________________________
401393
___________________/ /__/ /__/ /__/ /________________________________
402394
| / \ / \ / \ / \ \___
403-
|/ \_/ \_/ \_/ \ o \
395+
|/ \_/ \_/ \_/ \ o \
404396
\_____/--<
405397
@author: Diego Torres Milano
406398
@author: Jennifer E. Swofford (ascii art snake)
@@ -414,14 +406,6 @@ import os
414406

415407
if not options[USE_JAR]:
416408
print '''
417-
# PyDev sets PYTHONPATH, use it
418-
try:
419-
for p in os.environ['PYTHONPATH'].split(':'):
420-
if not p in sys.path:
421-
sys.path.append(p)
422-
except:
423-
pass
424-
425409
try:
426410
sys.path.append(os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
427411
except:
@@ -466,10 +450,7 @@ if options[INTERACTIVE]:
466450
data = s.recv(1024)
467451
code = ViewClient.excerpt(data)
468452
exec code
469-
# unfortunately, this does not work with monkeyrunner (OS X <= 22.0.1)
470-
#resp = raw_input("Continue recording events? [Y/n]: ")
471-
print >>sys.stderr, "Continue recording events? [Y/n]: "
472-
resp = fin.readline().strip()
453+
resp = raw_input("Continue recording events? [Y/n]: ")
473454
if resp in ['N', 'n']:
474455
break
475456
s.sendall("RECORD EVENTS STOP\n")

AndroidViewClient/tools/dump

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,12 @@ Created on Feb 3, 2012
66
@author: diego
77
'''
88

9-
__version__ = '4.2.0'
9+
__version__ = '4.5.2'
1010

1111
import sys
1212
import os
1313
import getopt
1414

15-
# PyDev sets PYTHONPATH, use it
16-
try:
17-
for p in os.environ['PYTHONPATH'].split(':'):
18-
if not p in sys.path:
19-
sys.path.append(p)
20-
except:
21-
pass
22-
2315
try:
2416
sys.path.append(os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
2517
except:

0 commit comments

Comments
 (0)