diff options
author | Marcos <dadinirt.socram@gmail.com> | 2013-01-23 16:02:16 (GMT) |
---|---|---|
committer | Marcos <dadinirt.socram@gmail.com> | 2013-01-23 16:02:16 (GMT) |
commit | 2ec39c4e51f96ec063b68b3652719007b1deefa1 (patch) | |
tree | 74b486fadf7db634d2b3b7ea974ebab16f72d96f /find-the-key.activity/parser | |
parent | 00610e5335e62f4b82ce0d3fb48572369bdc5188 (diff) |
Diffstat (limited to 'find-the-key.activity/parser')
-rwxr-xr-x | find-the-key.activity/parser/config.ini | 6 | ||||
-rwxr-xr-x | find-the-key.activity/parser/config.ini~ | 3 | ||||
-rwxr-xr-x | find-the-key.activity/parser/example (copia).py~ | 15 | ||||
-rwxr-xr-x | find-the-key.activity/parser/example.py | 13 | ||||
-rwxr-xr-x | find-the-key.activity/parser/voz.py | 21 | ||||
-rwxr-xr-x | find-the-key.activity/parser/voz.py~ | 21 |
6 files changed, 79 insertions, 0 deletions
diff --git a/find-the-key.activity/parser/config.ini b/find-the-key.activity/parser/config.ini new file mode 100755 index 0000000..aeed09f --- /dev/null +++ b/find-the-key.activity/parser/config.ini @@ -0,0 +1,6 @@ +[person] +name = Santiago +lastname = sugarlabs + +[silla] +name= Silla diff --git a/find-the-key.activity/parser/config.ini~ b/find-the-key.activity/parser/config.ini~ new file mode 100755 index 0000000..250b8ca --- /dev/null +++ b/find-the-key.activity/parser/config.ini~ @@ -0,0 +1,3 @@ +[person] +name = Santiago +lastname = sugarlabs diff --git a/find-the-key.activity/parser/example (copia).py~ b/find-the-key.activity/parser/example (copia).py~ new file mode 100755 index 0000000..4dfe779 --- /dev/null +++ b/find-the-key.activity/parser/example (copia).py~ @@ -0,0 +1,15 @@ +#!/usr/bin/python + +from subprocess import Popen + + +def say(text): + Popen(['espeak', '-v', 'es', text]) + + +def main(): + say('Hola tch') + + +if __name__ == "__main__": + main() diff --git a/find-the-key.activity/parser/example.py b/find-the-key.activity/parser/example.py new file mode 100755 index 0000000..c1f687a --- /dev/null +++ b/find-the-key.activity/parser/example.py @@ -0,0 +1,13 @@ +#!/usr/bin/python + +from ConfigParser import SafeConfigParser + + +def main(): + parser = SafeConfigParser() + parser.read('config.ini') + + print parser.get('person', 'name') + +if __name__ == "__main__": + main() diff --git a/find-the-key.activity/parser/voz.py b/find-the-key.activity/parser/voz.py new file mode 100755 index 0000000..b42f256 --- /dev/null +++ b/find-the-key.activity/parser/voz.py @@ -0,0 +1,21 @@ +#!/usr/bin/python + +from subprocess import Popen +from ConfigParser import SafeConfigParser + +def parseador(objeto, atributo): + parser = SafeConfigParser() + parser.read('config.ini') + + sayEs(parser.get(objeto, atributo)) + +def sayEs(text): + Popen(['espeak', '-v', 'es', text]) + + +def main(): + parseador("silla", "name") + + +if __name__ == "__main__": + main() diff --git a/find-the-key.activity/parser/voz.py~ b/find-the-key.activity/parser/voz.py~ new file mode 100755 index 0000000..59bd13a --- /dev/null +++ b/find-the-key.activity/parser/voz.py~ @@ -0,0 +1,21 @@ +#!/usr/bin/python + +from subprocess import Popen +from ConfigParser import SafeConfigParser + +def parseador(objeto, atributo): + parser = SafeConfigParser() + parser.read('config.ini') + + say(parser.get(objeto, atributo)) + +def say(text): + Popen(['espeak', '-v', 'es', text]) + + +def main(): + parseador("silla", "name") + + +if __name__ == "__main__": + main() |