12
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
1 |
import sys
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
2 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
3 |
def strip_path(pathname):
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
4 |
pathname = pathname.strip()
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
5 |
while pathname.find('/') != -1:
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
6 |
x=pathname.find('/')
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
7 |
pathname = pathname[x+1:]
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
8 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
9 |
while pathname.find('\\') != -1:
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
10 |
x=pathname.find('\\')
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
11 |
pathname = pathname[x+1:]
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
12 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
13 |
#print 'strip_path returning %s' % pathname
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
14 |
return pathname
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
15 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
16 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
17 |
res_f = open('symbian_2_public_api_list.txt')
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
18 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
19 |
pubapis=[]
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
20 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
21 |
for line in res_f:
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
22 |
pathname = line[0:len(line)-1]
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
23 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
24 |
filename = strip_path(pathname).lower()
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
25 |
pubapis.append(filename)
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
26 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
27 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
28 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
29 |
def is_public(shortname):
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
30 |
fname=strip_path(shortname).lower()
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
31 |
#print 'finding %s in public apis' % fname
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
32 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
33 |
return fname in pubapis
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
34 |
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
35 |
if (is_public(sys.argv[1])):
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
36 |
print 'Public'
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
37 |
else:
|
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
38 |
print 'Platform' |