scripts/python/ispublic/ispublic.py
changeset 12 d2f4d301e581
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/python/ispublic/ispublic.py	Wed Nov 18 14:00:16 2009 +0000
@@ -0,0 +1,38 @@
+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'
\ No newline at end of file