forked from juliomfreitas/AndroidViewClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-import.py
More file actions
executable file
·40 lines (35 loc) · 1.05 KB
/
check-import.py
File metadata and controls
executable file
·40 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /usr/bin/env python
'''
Created on Aug 29, 2012
@author: diego
'''
import re
import sys
import os
debug = False
if '--debug' in sys.argv or '-X' in sys.argv:
debug = True
try:
if os.environ.has_key('ANDROID_VIEW_CLIENT_HOME'):
avcd = os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src')
if os.path.isdir(avcd):
sys.path.append(avcd)
else:
print >>sys.stderr, "WARNING: '%s' is not a directory and is pointed by ANDROID_VIEW_CLIENT_HOME environment variable" % avcd
except:
pass
if debug:
print >>sys.stderr, "sys.path=", sys.path
for d in sys.path:
if d in [ '__classpath__', '__pyclasspath__/']:
continue
if not os.path.exists(d):
if re.search('/Lib$', d):
if not os.path.exists(re.sub('/Lib$', '', d)):
print >>sys.stderr, "WARNING: '%s' is in sys.path but doesn't exist" % d
import com
import com.dtmilano
import com.dtmilano.android
import com.dtmilano.android.viewclient
from com.dtmilano.android.viewclient import ViewClient, View
print "OK"