-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupernova.py
More file actions
28 lines (26 loc) · 874 Bytes
/
Copy pathsupernova.py
File metadata and controls
28 lines (26 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from willie import module
from willie.module import commands, interval
import subprocess
@commands('supernova')
def supernova(bot, trigger):
args = trigger.group(2)
command = 'supernova ' + args
process = subprocess.Popen(command,shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
#process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# out, err = process.communicate()
#bot.say('doing stuff')
process.wait()
for line in process.stdout:
bot.say(line)
# for thing in process.stderr:
# bot.say(thing)
#for line in err:
# bot.say(err)
#bot.say('did stuff!')
#bot.say(out)
# bot.say(err)
return module.NOLIMIT