Last active
August 30, 2015 16:20
-
-
Save gbin/8faadcce28872fc0c395 to your computer and use it in GitHub Desktop.
Simple sample to read a file and return the output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from errbot import BotPlugin, botcmd | |
from os.path import join | |
DAYS_PATH = 'f:/errplugins/' | |
class School(BotPlugin): | |
@botcmd | |
def missed_day(self, msg, args): | |
"""Get missed day and provide assignment summary.""" | |
with open(join(DAYS_PATH, "summary.%s" % args), 'r') as f: | |
return f.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment