json = {'data':{'variables':{'startupProcessInfo':{'iin': 'first'}}, 'piid': 'second', 'executionState': 'third', 'creationTime': 'fourth'}}
path_arr = ["['data']['variables']['startupProcessInfo']['iin']",
"['data']['piid']",
"['data']['executionState']",
"['data']['creationTime']"]
for x in path_arr:
json_iter = json
path = x[2:-2].split("']['")
for p in path:
json_iter = json_iter[p]
print(json_iter)
========================== RESTART: E:/Python/1.py ==========================
first
second
third
fourth
url(r"^tbot/", news_views.tbot, name='tbot')
import telebot
def tbot(request):
bot = telebot.TeleBot('мой_ключ_бота')
@bot.message_handler(content_types=['text'])
def echo_all(message):
bot.send_message(message.chat.id, message.text)
return HttpResponse()
{
"ok": true,
"result": {
"url": "https://mydomen.ru/bot/",
"has_custom_certificate": true,
"pending_update_count": 18,
"last_error_date": 1505904514,
"last_error_message": "Wrong response from the webhook: 403 Forbidden",
"max_connections": 40
}
}
self.tabWidgets.setGeometry(QtCore.QRect(10, 170, 541, 351))
self.add_project_tab()
self.H2layout.addWidget(self.tabWidgets)
обработать - произвести вычисления
sim3x, ну уже давно тут сидим, ну к чему вопросы?)))