mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 20:29:55 +01:00
simpler py2/py3 input in clibot example
This commit is contained in:
parent
474d5f0c9f
commit
73c60ee817
1 changed files with 3 additions and 4 deletions
|
@ -24,6 +24,8 @@ from telegram.ext.dispatcher import run_async
|
|||
from time import sleep
|
||||
import logging
|
||||
|
||||
from future.builtins import input
|
||||
|
||||
# Enable Logging
|
||||
logging.basicConfig(
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
|
@ -153,10 +155,7 @@ def main():
|
|||
|
||||
# Start CLI-Loop
|
||||
while True:
|
||||
try:
|
||||
text = raw_input()
|
||||
except NameError:
|
||||
text = input()
|
||||
text = input()
|
||||
|
||||
# Gracefully stop the event handler
|
||||
if text == 'stop':
|
||||
|
|
Loading…
Add table
Reference in a new issue