Skip to content

Commit 73c60ee

Browse files
committed
simpler py2/py3 input in clibot example
1 parent 474d5f0 commit 73c60ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/clibot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from time import sleep
2525
import logging
2626

27+
from future.builtins import input
28+
2729
# Enable Logging
2830
logging.basicConfig(
2931
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
@@ -153,10 +155,7 @@ def main():
153155

154156
# Start CLI-Loop
155157
while True:
156-
try:
157-
text = raw_input()
158-
except NameError:
159-
text = input()
158+
text = input()
160159

161160
# Gracefully stop the event handler
162161
if text == 'stop':

0 commit comments

Comments
 (0)