Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
🛰️ Flags of the #Kaliningrad Region and the City of Zelenogradsk are back from #ISS🌍 to be later exhibited in #Kaliningrad Regional Museum of History and Arts.
📸 by the Museum
🚀🌍Le commandant de l'ISS et envoyé spécial de TASS à bord, Sergueï Koud-Svertchkov, a montré des images du vaisseau spatial Crew Dragon approchant de la station.
#iss#espace
LIVE: Farewells, hatch closing for Soyuz MS-18 crew on ISS
Farewells and hatch closing for the Soyuz MS-18 crew on the International Space Station.
#Reuters#Live#News#Space#ISS
➖@reutersworldchannel➖
🇷🇺🛰️ Le vaisseau cargo Progress MS‑32 s’est désamarré du module Zvezda du segment russe de la Station spatiale internationale (ISS) avant l’arrivée d’un nouveau cargo, montre la retransmission de Roscosmos.
#russie#vaisseau#iss