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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #languages

当前筛选 #languages清除筛选
help florin закрыт

@HELPFLORIN · Post #6796 · 20.03.2023 г., 07:34

𖥻 🍵 ›› ֗ . . ✦ › › ᥴуⲙᥱρκᥙ ; цᥱρκ᧐ʙь δ᧘ᥲᴦ᧐ᥴ᧘᧐ʙᥱнᥙᥱ нᥱδ᧐ жᥙᴛᥱ᧘ᥱᥔ κ᧐ᥴⲙ᧐ᥴ ;ᤋʙᥱᤋд᧐ᥰᥲд ➫ 𝘁𝗮𝗴𝘀 — #languages `` взяⲗυ ♡゙ — ‹ + › ⲃ ⲕⲟⲙⲙ.

Hashtags

Daily Channels

@dailychannels · Post #6730 · 06.03.2026 г., 01:00

Channel: Learn English in Ethiopia Members: ~12.12K 💢 Username: @englishlearn_ethiopia Description: Home of English learners! Buy ads: https://telega.io/c/EnglishLearn_Ethiopia 🏷 Tags: #languages https://lve.to/jg2rmu2jlz

Hashtags

Daily Channels

@dailychannels · Post #6682 · 14.02.2026 г., 13:00

Channel: Urban Dictionary Members: ~2.01K 💢 Username: @urbandictionary Description: Read new words from Urban Dictionary every day. Source: urbandictionary.com Bot: @UrbanDictionaryBot Chat: @UrbanDictionaryChat (Unofficial) 🏷 Tags: #languages https://lve.to/uahjrdrvyo

Hashtags

Daily Channels

@dailychannels · Post #6388 · 02.10.2025 г., 13:00

Channel: BBC Learning English Members: ~73.81K 💢 Username: @english_bbc_learning Description: ️ http://linkin.bio/bbclearningenglish 🏷 Tags: #languages https://telegramchannels.me/channels/english_bbc_learning

Hashtags

Daily Channels

@dailychannels · Post #6175 · 02.07.2025 г., 01:00

Channel: English with shei Members: ~4.72K 💢 Username: @englishwithshei Description: More English!🦸 ‍ ️ 🏷 Tags: #languages https://telegramchannels.me/channels/englishwithshei

Hashtags

Daily Channels

@dailychannels · Post #5886 · 12.03.2025 г., 01:00

Channel: Language Trivia Members: ~6.36K 💢 Username: @languagetrivia Description: Are you a language enthusiast looking for a fun challenge? @languagetrivia delivers daily quizzes and trivia, from simple multiple-choice questions to riddles and 'guess the language' challenges. For inquiries, contact @venklypaul 🏷 Tags: #languages https://telegramchannels.me/channels/languagetrivia

Hashtags

Daily Channels

@dailychannels · Post #5875 · 09.03.2025 г., 13:00

Channel: Babelgram News Members: ~64.68K 💢 Username: @babelgram Description: All about @BabelgramBot. The best bot in Telegram for translations Discussion group: https://t.me/+ZuHYMBvgjsU1YTQ0 🏷 Tags: #languages https://telegramchannels.me/channels/babelgram

Hashtags

Daily Channels

@dailychannels · Post #6507 · 25.11.2025 г., 13:00

Group: Search English Groups & Channels Members: ~2.3K 💢 Username: @seekcommunity Description: This group helps you discover English groups and channels. Simply send a word here, and you’ll receive matching results. Seek Bot: @seek Seek Announcement: @SeekAnnouncement 🏷 Tags: #languages #seek,telegram,deepseek https://telegramchannels.me/groups/seekcommunity

Bots Channel

@BotsChannel · Post #215 · 17.05.2016 г., 14:02

🏆Bot of the day🏆 @fixmebot This Bot helps you to write in English and efficiently corrects texts. With @fixmebot you won’t need to waste time trying to find the correct way to write a sentence. Checking grammar has never been so easy! #Grammar#English#Languages

🌍📚 The office of the Honorary Consul of South Africa in Yekaterinburg hosted a workshop on consecutive interpretation for 11th-grade students of School No. 212. 🇿🇦 During the session, we explored the culture and history of South Africa, while also delving into the professional life of interpreters. 🗣 The workshop was conducted in both Russian and English: students took turns stepping into the shoes of an interpreter, followed by a group analysis of their performance. ✨ The students got a firsthand experience of what it’s like to work as an interpreter, gaining valuable insight into this dynamic profession! #SouthAfrica#Yekaterinburg#Translation#Education#School#Culture#Languages#InternationalTranslationDay

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