r4761 - in developers/charlie: . Stuffs

charlie at docs.openmoko.org charlie at docs.openmoko.org
Thu Nov 6 09:58:53 CET 2008


Author: charlie
Date: 2008-11-06 09:58:53 +0100 (Thu, 06 Nov 2008)
New Revision: 4761

Added:
   developers/charlie/Stuffs/
   developers/charlie/Stuffs/find_at.py
Log:
Added simple script to retrieve AT commands used by framework ogsmd


Added: developers/charlie/Stuffs/find_at.py
===================================================================
--- developers/charlie/Stuffs/find_at.py	                        (rev 0)
+++ developers/charlie/Stuffs/find_at.py	2008-11-06 08:58:53 UTC (rev 4761)
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+# under GPL3 licence, copyright Guillaume Chereau
+# (charlie at openmoko.org)
+
+# I use this script to retrieve all the AT commands from ogsmd
+# code. It just parse all the inputs for strings ("*" or '*') and
+# remove those who contains any lowercase characters. It is a good
+# approximation...
+
+import sys
+import re
+
+re_expr = re.compile(r'''(?:'.*?')|(?:".*?")''')
+
+ret = set()
+for l in sys.stdin.readlines():
+    for match in re_expr.findall(l):
+        if match.isupper():
+            ret.add(match)
+
+for r in ret:
+    print r


Property changes on: developers/charlie/Stuffs/find_at.py
___________________________________________________________________
Name: svn:executable
   + *




More information about the commitlog mailing list