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

Резултати

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

Пребарај: #eastprussian

当前筛选 #eastprussian清除筛选
Russian MFA 🇷🇺

@MFARUSSIA · Post #27998 · 13.01.2026 г., 18:01

#Victory81 🌟 On January 13, 1945, the #EastPrussian Offensive by the Red Army — one of the largest and most important #WWII operations against Nazi Germany — commenced. As a result of the operation in the #EastPrussia, the Soviet forces ultimatelydestroyed the Nazis' most capable, experienced, trained and equipped divisions on the entire Eastern front. The 'invincible reich' lost a critical strategic bridgehead in the Baltic region. The fortress city of #Königsberg — the cradle of German militarism and the starting point of eastward expansion — fell once and for all. The triumph of the Red Army in East Prussia held profound symbolic significance: the Nazis were decisively and completely crushed right there, where from, back in June 1941, they treacherously attacked our Motherland. ▪️“There it is, cursed Germany,”— that was what the Soviet soldiers-liberators said while stepping on the enemy's soil to pursue the condign retribution upon the Germans on their own territory. Those were exactly the accurate words to call the country where the most terrible evil the Mankind ever saw in its history — the Nazi scourge — was nurtured. The Germans sought Moscow’s fall, but instead they witnessed with disgrace the collapse of their own “great Reich.” *** The East-Prussian operation. The details January-April, 1945 The battles on the East Prussian theatre of operations lasted for 103 days, which made it the area that saw the longest continuous military engagement in the final year of #WW2. In the region, the Nazis constructed an exceptionally formidable defensive system, tailored to the specific features of terrain. The capital of East Prussia — the fortress city of Königsberg — was equipped with both external and internal urban fortification systems. In East Prussia, the Red Army faced the Nazi army with the personnel strength of some 780'000 Wehrmacht soldiers and officers. ⚔️ On January 13, 1945, the units of the 2nd Byelorussian and forces of the 3rd Byelorussian Fronts of the Red Army launched the offensive in East Prussia. Through the swift and overwhelming assault, the Soviet armor and the infantry, with the support of the aviaton, reached the Baltic Sea near Elbing (now the city of Elbląg in northern Poland) already on the third day of the operation, thus, having cut off any possible retreat routes for the enemy from East Prussia westwards. In less than two weeks, the Soviet forces broke through to Königsberg — the infamous Nazi citadel, which had allowed the Germans to dominate the eastern Baltics throughout the entire war, wasencircled. By February 10, 1945, the Nazi army group 'North' had been split into three isolated and tied down formations that were further driven to the coastline with no hope of escape. In April, the Königsberg garrison — numbering around 200'000 Wehrmacht soldiers and officers — was defeatedand surrendered. On April 9, the Red Army seized the fortress completely — the impregnable stronghold of the Third Reich, fortified with the latest military technology of WWII-era, finally fell. The loss of significant forces and militarily and economically vital region of East Prussia hastened Germany’s defeat. The Soviet forces inflictedhuge losses on the Wehrmacht and completely severed Third Reich’s maritime supply lines, crippling logistics for the blockaded 'Courland Pocket'. To commemorate the Heroic Victory in East Prussia, the medal 'For the Capture of Königsberg' was instituted in the USSR. The Medal was awarded to approximately 760'000 Red Army soldiers and officers. Aftermath WWII, under the terms approved by the Allied Leaders at the #PotsdamConference, much of East Prussia was incorporated into Poland, while a third of East Prussia territory, including the city of Königsberg (the Kaliningrad Region), became part of the Soviet Union. 🎖 By the Executive Order of President of Russia Vladimir Putin (signed on November 17, 2025), a new memorial date was established in our country — April 9, the Day of the Heroic Assault and Capture of Königsberg (1945).