scripts/python/ispublic/ispublic.py
author Sebastian Brannstrom <sebastianb@symbian.org>
Wed, 18 Nov 2009 14:00:16 +0000
changeset 12 d2f4d301e581
permissions -rw-r--r--
Cleanup

import sys

def strip_path(pathname):
	pathname = pathname.strip()
	while pathname.find('/') != -1:
		x=pathname.find('/')
		pathname = pathname[x+1:]

	while pathname.find('\\') != -1:
		x=pathname.find('\\')
		pathname = pathname[x+1:]		
	
	#print 'strip_path returning %s' % pathname
	return pathname


res_f = open('symbian_2_public_api_list.txt')

pubapis=[]

for line in res_f:
	pathname = line[0:len(line)-1]
	
	filename = strip_path(pathname).lower()
	pubapis.append(filename)
	

	
def is_public(shortname):
	fname=strip_path(shortname).lower()
	#print 'finding %s in public apis' % fname
	
	return fname in pubapis

if (is_public(sys.argv[1])):
	print 'Public'
else:
	print 'Platform'