create_connection_mysql_db('localhost',
а почему localhost?Как сформировать код?В сети достаточно много руководств и примеров как работать с SQL в Python.
await bot.send_document(chat_id=message.chat.id, document=bb)
import pandas
from io import BytesIO
one = 'ttt'
to_add = {'1': one,
'2': one,
'3': one,
'4': one,
'5': one,
'6': one,
'7': one}
bb = BytesIO()
bb.name = f'test.xlsx'
bb.encoding = "utf-8"
df = pandas.DataFrame()
df = df.append(to_add, ignore_index=True)
print(df)
df.to_excel(bb, index=False)
with open(bb.name, 'wb') as f:
f.write(bb.getbuffer())
bot = Bot(token=API_TOKEN)
loop = asyncio.get_event_loop() # В Python 3.7: asyncio.get_running_loop()
dp = Dispatcher(bot, loop=loop)
if message.text == 'a':
dp.loop.create_task(periodic()) # создаем задачу асинхронно и НЕ дожидаемся ее выполнения (await)
print("I'm working hard")
async def periodic():
time.sleep(5) # Delay for 5 seconds.
The easiest way to describe what Mono currently supports is:с Gtk#, Windows.Forms и др. А есть .Net Core. Правда потребуется установить фреймворк.
Everything in .NET 4.7 except WPF, WWF, and with limited WCF and limited ASP.NET async stack.
кликнуть на нее
try:
import Image
except ImportError:
from PIL import Image
"C:\Users\vayak\PycharmProjects\pythonProject5\img.jpg"