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

Резултати

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

Пребарај: #thatsong

当前筛选 #thatsong清除筛选
꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8736 · 10.04.2026 г., 13:59

╰─➤3:14 Y sintiéndote así Estás tocando cima pero no te ves ahí Viviendo en una vida que otros quieren para ti Quieres salir ya de aquí cómo vas a hacer El día que no te quede más tiempo que perder Soñando con el mundo que querías conocer Dime que vas a hacer Que vas hacer Porque no aguantas más…🎶 #ThatSong🎤 #Lemot ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8635 · 15.03.2026 г., 14:14

╰─➤2:57 Heaven knows when I close my eyes I get lost in your paradise Daydreaming (Daydreaming) I can't stop dreaming about you Imagine all the things we could do I can't stop dreaming about you (about you about you) Daydreaming (Daydreaming) I wanna get you outta my head… 🎶 #ThatSong🎤 #Jordan_Frye ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8338 · 31.12.2025 г., 11:03

╰─➤3:19 Tu boquita de fresa mi mojito de menta las cosas bonitas al final se encuentran Noche ochentera (oh) toa la noche entera (noche entera) Hay una cola que tela, pero ven con quien quieras (ven con quieras, woh-oh) Noche ochentera toa la noche entera Cógeme la cadera, que bailamos la lenta tú y yo La noche entera-era, eh-eh-eh… 🎶 #ThatSong🎤 #Vicco ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8312 · 24.12.2025 г., 10:55

╰─➤4:39 A crowded room, friends with tired eyes I'm hiding from you and your soul of ice My God, I thought you were someone to rely on Me? | guess | was a shoulder to cry on A face of a lover with a fire in his heart A man undercover, but you tore me apart… 🎶 #ThatSong🎤 #First_To_Eleven ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8203 · 06.11.2025 г., 15:19

╰─➤3:44 I don't wanna be your ex We way too good at being friends Can we still hangout On the low, get wild I don't wanna be your, I don't wanna be your Hit ya girl up with a text, when you're alone and feeling stressed I don't gotta be in love with you, to love you I don't wanna be your, so don't treat me like your E-e-e-e, e-e-ex… #ThatSong🎤 #Kiana_Ledé ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8074 · 10.09.2025 г., 14:23

╰─➤2:34 Ale, (Ale) j'ai plus la deter laisse tomber (laisse tomber) Aie, faut qu'on laisse tomber Hmm lol, tu regrettes à tous les coups (coups) Je t'aime un peu moins quand tu joues (joues) Maintenant c'est chacun sa route (ahh) Hmm lol, tu regrettes à tous les coups (coups) Je t'aime un peu moins quand tu joues (joues) Maintenant c'est chacun sa route (ahh) … 🎶 #ThatSong🎤 #mademoisellelou ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #8025 · 24.08.2025 г., 12:53

╰─➤3:52 So if it's any consolation, you're my favorite (ah) It's you and I, you gotta know that, right? Isn't it obvious? (Ah-ah) You know that we got enough (ah-ah) Isn't it obvious (ah-ah) That I'm sure? Mm-mm (I'm sure, I'm sure) Isn't it obvious? (Oh, no, ah-ah) You know that we got enough (yeah, ah-ah) Isn't it obvious (ah-ah)… 🎶 #ThatSong🎤 #Alessia_Cara ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #7892 · 07.07.2025 г., 15:35

╰─➤3:31 Against my better judgement I'm sitting in your car (ooh) I'm writing down my number on the inside of your arm Against my better judgement I'm letting down my guard (ooh) I know the repercussions of cruising boulevards With girls like you Ooh-oh, ooh-oh, ooh-oh With girls like you… 🎶 #ThatSong🎤 #Sofia_Camara ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #7813 · 20.06.2025 г., 14:24

╰─➤4:32 And don't say hello, 'cause I got high again And forgot to fold my clothes 'Cause I'm too messy, and then I'm too fucking clean You told me, "Get a job, " then you ask where the hell I've been And I'm too perfect 'til I open my big mouth I want to be me, is that not allowed? And I'm too clever, and then I'm too fucking dumb… 🎶 #ThatSong🎤 #Lola_Young ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻ ENLACE ⏏️

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #7557 · 21.03.2025 г., 20:04

╰─➤2:51 When we talk about, everything that happened Rather sit around, don't need another lesson You'd just call me out, call me when I'm distant Always run your mouth, I don't wanna listen All the shit you put me through, put me through And now you're talkin' 'bout me too And I know that I could never get away from you Yeah, I'll wait for you to turn around and talk it through But we won't…🎶 #ThatSong🎤 #The_Marías ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻

꧁☬Pinceladas del Alma☬꧂

@pinceladasdelalma · Post #7506 · 28.02.2025 г., 13:30

╰─➤3:54 If you feel like getting close, don't If you're lookin' for my heart, let go If you feel like getting close, don't fall 'Cause the minute that we touch, locked down Yeah, the minute that we touch, locked down (ayy, ayy) I ain't tryna feel my heart break, no I might never wanna let you go 'Cause the minute that we touch, locked down Yeah, the minute that we touch, locked down Oh, if you're lookin' for my heart Ooh, ooh.. #ThatSong🎤 #Destiny_Rogers ⇆ㅤ◁ㅤ ❚❚ㅤ ▷ㅤ↻

ПретходнаСтраница 1 од 3Следна