TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #208 · 29 јан.

Ранее мы уже говорили о том, как выполнить какой-либо код перед открытием интерактивной консоли. Расскажу еще один способ! На самом деле, даже запустив интерпретатор в обычном режиме с выполнением скрипта из файла вы можете в любом месте активировать интерактивный режим. Или даже несколько по очереди. За это отвечает модуль code. Как это может пригодиться? 🔸 Вам не хватает pdb и хочется больше "власти" 🔸 Нужно запросить у юзера данные в достаточно сложном виде. В этом случае можно попросить его создать что ему надо и сохранить в определённую переменную, с которой потом и работать. 🔸 Нужна изолированная среда для выполнения каких-либо действий. 🔸 Просто забавы ради😁 Запускается консоль очень просто import code ic = code.InteractiveConsole() try: ic.interact() except SystemExit: pass Выход обратно на предыдущий уровень происходит как обычно, вызов функции exit() или клавиши Ctrl+D(Ctrl+Z для Windows). Я набросал простой пример с некоторым функционалом 🔹 Меняются символы приглашения 🔹 В неймспейсы добавляются дополнительные объекты 🔹 Считается время, проведённое в интерактивном режиме 🔹 Скрипт просит юзера заполнить переменную и по выходу распечатывает её значение Код здесь ↗️ Для запуска сохраните код в файл и запускайте как обычный скрипт. python my_console.py Для быстрого запуска можно сделать отдельный алиас alias py="python3 /home/username/my_console.py" #tricks#source

Резултати

Пронајдени 175 слични објави

Пребарај: #romania

当前筛选 #romania清除筛选
POPULAR FRONT

@popularxfront · Post #4196 · 18.12.2025 г., 23:46

🇷🇴#Romania: Archival footage from the Romanian Revolution of December 1989 captures armed clashes between rebels, government forces, and so-called terrorists. The uprising began in Timișoara after authorities attempted to evict Hungarian pastor Tőkés, sparking protests that escalated nationwide. The regime responded by ordering live fire against civilians, resulting in hundreds of deaths. However, parts of the army switched sides, and after Ceaușescu’s control collapsed (Communist Romania's leader), authorities claimed the country was under attack by foreign agents. Chaos ensued, with armed civilians, Securitate agents (Romanian KGB), and army units clashing, leading to friendly fire and panic, with passersby often labeled as terrorists. The violence subsided rapidly after Ceaușescu’s execution and consolidation of power by the National Salvation Front. The alleged terrorists vanished, gunfire declined, and investigations stalled. To this day, the true elements responsible for the deaths remain unknown.

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1705 · 31.03.2026 г., 12:14

Romania🇷🇴 ✅ Romania is a classic European country known for its beautiful beaches, stunning nature, and famous ski resorts. If you prefer a calm and relaxed vacation, this is a great option. ✅ While Romania may not be the wealthiest country in Europe, interest in it has significantly grown in recent years. With plenty of sunshine, clear seas, and beautiful mountains, it offers many attractions. Highlights include well-preserved medieval castles and picturesque national parks. #Romania | @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1173 · 24.11.2024 г., 13:14

ROMANIA🇷🇴 ✅ Romania is a classic European country known for its beautiful beaches, stunning nature, and famous ski resorts. If you prefer a calm and relaxed vacation, this is a great option. ✅ While Romania may not be the wealthiest country in Europe, interest in it has significantly grown in recent years. With plenty of sunshine, clear seas, and beautiful mountains, it offers many attractions. Highlights include well-preserved medieval castles and picturesque national parks. #Romania @voyage

Hashtags

BAZUKA

@jbazuka · Post #116 · 07.07.2022 г., 05:53

🇷🇴#RomaniaНа западе Румынии горит пшеничное поле ⚠️☝️ 💬 Огонь охватил около 100 га. Причиной, предположительно, стала сильная жара: последние дни температура воздуха тут достигает +40 °С. 💬 Местные предполагают, что на самом деле это спланированное уничтожение пшеничного поля, чтобы создать искуственный голод!

Hashtags

Interesting Planet 🌍

@interesting_planet_facts · Post #1230 · 17.01.2026 г., 12:11

🌎 Deep inside Romania’s Apuseni Mountains, the Scarisoara Ice Cave contains one of the oldest and largest underground glaciers in the world. The ice block is over 3,500 years old and reaches about 26 meters thick. ✨ #caves⚡#geology⚡#Romania 👉subscribe Interesting Planet 👉more Channels ​

POPULAR FRONT

@popularxfront · Post #5150 · 27.02.2026 г., 19:48

🇺🇦#Ukraine / 🇷🇴#Romania - 🇷🇺#Russia: Footage shows a Russian Shahed drone being shot down by Ukrainian air defence over the Danube River in Odesa Oblast this morning. The video was filmed from the Romanian side of the border, showing just how close these drones are flying next to neighbouring countries. Over the past years, there have been multiple incidents of such drones crashing into Romanian territory. (📹 via @Archer83Able on X)

Tutto Elezioni

@tuttoelezioni · Post #999 · 18.05.2025 г., 18:29

#Romania🇷🇴 #Presidenziali 🕗Ore 20:00 italiane (21:00 ora locale). Affluenza parziale (dati interni ed esteri): 64,72% (+11,51% rispetto al primo turno). Affluenza parziale (solo dati interni): 55,57% (+7,77% rispetto al primo turno). @TuttoElezioni

123•••10•••1415
ПретходнаСтраница 1 од 15Следна