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