Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples
diff options
context:
space:
mode:
authorWalter 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)
commit363950e62d11949cf16609df30a7f8877b42810a (patch)
treed86a306803d4d68a36a7d62bfc2f3589c61650dd /pysamples
parent354eb28f647d99f58d22407cac587793acbfe2f0 (diff)
code cleanup
Diffstat (limited to 'pysamples')
-rw-r--r--pysamples/speak.py8
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))