diff options
author | Santhosh Thottingal <santhosh.thottingal@gmail.com> | 2009-03-24 21:53:02 +0530 |
---|---|---|
committer | Santhosh Thottingal <santhosh.thottingal@gmail.com> | 2009-03-24 21:53:02 +0530 |
commit | 925ba08ecb3ff12496d343a1a0a99daf9a32ad3d (patch) | |
tree | 91aff87b0818e4e861a0ad2c6843d2286cb3775b /silpa/modules/fortune | |
parent | 886b09e5d997af17d1b0a9c7fad6e952a94bed45 (diff) | |
download | Rachana.git-925ba08ecb3ff12496d343a1a0a99daf9a32ad3d.tar.gz Rachana.git-925ba08ecb3ff12496d343a1a0a99daf9a32ad3d.tar.xz Rachana.git-925ba08ecb3ff12496d343a1a0a99daf9a32ad3d.zip |
Adding Silpa framework
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) + |