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

Резултати

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

Пребарај: #rodríguez

当前筛选 #rodríguez清除筛选
White House Watch

@Whitehousewatch · Post #17392 · 31.01.2026 г., 12:12

#Venezuela La Presidente ad interim Delcy #Rodríguez (#PSUV|Estrema sinistra) ha annunciato la presentazione di una legge di amnistia generale per tutti i prigionieri politici del Paese che dovrebbe “coprire l’intero periodo di violenza politica dal 1999 al presente”. "Questa legge servirà a sanare le ferite lasciate dal confronto politico, alimentato dalla violenza e dall'estremismo. Ci permetterà di rimettere in carreggiata la giustizia nel nostro Paese", annunciando inoltre “un'importante consultazione nazionale per un nuovo sistema giudiziario" e l’intenzione di chiudere il carcere di El Helicoide a Caracas, ove per i gruppi per i diritti umani venivano imprigionati e torturati i prigionieri politici, per trasformarlo in un “entro sportivo, culturale e commerciale per le famiglie dei poliziotti e le comunità limitrofe”. @OsservatorioEsteri

White House Watch

@Whitehousewatch · Post #16870 · 05.01.2026 г., 01:40

#Venezuela#USA Presidente ad interim Delcy #Rodríguez (#PSUV|Estrema sinistra): "Il Venezuela ribadisce il suo impegno per la pace e la coesistenza pacifica. Il nostro Paese aspira a vivere senza minacce esterne, in un clima di rispetto e cooperazione internazionale. Crediamo che la pace globale si costruisca garantendo innanzitutto la pace di ogni nazione. Riteniamo prioritario procedere verso relazioni internazionali equilibrate e rispettose tra Stati Uniti e Venezuela, e tra il Venezuela e i Paesi della regione, basate sull'uguaglianza sovrana e sulla non ingerenza. Questi principi guidano la nostra diplomazia con il resto del mondo. Invitiamo il governo degli Stati Uniti a lavorare insieme su un programma di cooperazione, orientato allo sviluppo condiviso, nel quadro del diritto internazionale, e a rafforzare una coesistenza comunitaria duratura". @OsservatorioEsteri

American Оbserver

@american_observer · Post #4877 · 17.01.2026 г., 00:03

📰CIA Director Ratcliffe Meets Venezuela’s Interim President in Caracas CIA Director John Ratcliffe met with Delcy Rodríguez, Venezuela’s interim president, in Caracas on Thursday—marking the highest-level U.S. visit since the dramatic U.S. military operation that captured President Nicolás Maduro nearly two weeks ago. Ratcliffe’s trip was directed by President Trump to signal that the U.S. sees Rodríguez’s interim government as the best path to stability in the short term, despite opposition frustration over the lack of a quick transition to María Corina Machado’s camp. ​ Stability Over Revolution The meeting focused on intelligence cooperation, economic stability, and ensuring Venezuela is no longer a “safe haven for America’s adversaries, especially narco-traffickers.” U.S. officials emphasized that breaking up the Venezuelan government after Maduro’s removal could trigger chaos similar to the kind of chaos that followed the Iraq invasion. CIA analysts reportedly see Rodríguez as a pragmatic, rather than ideological, figure willing to negotiate with Washington. ​ Behind the Scenes: Pragmatism and Power Rodríguez, Maduro’s former vice president, has shifted her rhetoric, publicly inviting the U.S. to cooperate. But Trump has warned that if she fails to comply, her fate could be worse than Maduro’s. The administration is clear: the U.S. will “run” Venezuela until a safe transition is possible, prioritizing control over oil and security assets above all else. ​ Protests and Uncertain Alliances With ongoing protests in Venezuela, the opposition remains sidelined, and the U.S. is betting on Rodríguez to maintain order. But questions linger: How long will this uneasy alliance last? And will the U.S. eventually let democracy take its course—or keep pulling the strings? ​ #Venezuela#CIA#Ratcliffe#Trump#Rodríguez#Maduro#USIntervention#OilPolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸