diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-02-23 13:15:08 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-02-23 13:15:08 (GMT) |
commit | 363950e62d11949cf16609df30a7f8877b42810a (patch) | |
tree | d86a306803d4d68a36a7d62bfc2f3589c61650dd /pysamples/speak.py | |
parent | 354eb28f647d99f58d22407cac587793acbfe2f0 (diff) |
code cleanup
Diffstat (limited to 'pysamples/speak.py')
-rw-r--r-- | pysamples/speak.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pysamples/speak.py b/pysamples/speak.py index 2a1f88c..594c296 100644 --- a/pysamples/speak.py +++ b/pysamples/speak.py @@ -32,8 +32,10 @@ def myblock(lc, x): import os - if type(x) == float: - if int(x) == x: - x = int(x) + # Turtle Art numbers are passed as float, + # but they may be integer values. + if type(x) == float and int(x) == x: + x = int(x) + os.system('espeak "%s" --stdout | aplay' % (x)) |