diff options
Diffstat (limited to 'silpa/modules/fortune')
-rw-r--r-- | silpa/modules/fortune/fortune.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/silpa/modules/fortune/fortune.py b/silpa/modules/fortune/fortune.py new file mode 100644 index 0000000..c6340c3 --- /dev/null +++ b/silpa/modules/fortune/fortune.py @@ -0,0 +1,16 @@ +# Spellchecker with language detection +# coding: utf-8 +# +# Copyright © 2008 Santhosh Thottingal +# Released under the GPLV3+ license + +import commands +class Fortune: + def fortune(self, word): + if(word): + command = "/usr/games/fortune -m" + word + return commands.getoutput(command) + else: + command = "/usr/games/fortune" + return commands.getoutput(command) + |