summaryrefslogtreecommitdiffstats
path: root/silpa/modules/fortune/fortune.py
blob: c6340c33d7ed58a3592ad5b4dd5f1d6f0ff94a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)