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

TGINSIGHT SIMILAR POSTS

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

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

Первая директория в sys.path 🔸 Когда вы запускаете Python-интерпретатор в интерактивном режиме, в системные пути (sys.path) в самое начало добавляется текущая рабочая директория >>> for path in sys.path: ... print(f'"{path}"') "" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Первая строка пустая, что и означает текущую рабочую директорию. 🔸 Если вы запускаете интерпретатор передавая скрипт как аргумент, то история получается иная. На первом месте будет директория в которой располагается скрипт. А текущая рабочая директория игнорируется. Пишем скрипт с таким содержанием: # script.py import sys for path in sys.path: print(f'"{path}"') Запускаем python3 /home/user/dev/script.py Получаем "/home/user/dev" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... 🔸 Если вы запускаете скрипт по имени модуля то на первом месте будет домашняя директория текущего юзера python3 -m script "/home/user" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Скрипт должен быть доступен для импорта На что это влияет? На видимость модулей для импорта. Если вы ждёте, что, запустив скрипт по пути, сможете импортировать модули из текущей рабочей директории, то вы ошибаетесь. Придётся добавлять путь os.getcwd() в sys.path самостоятельно или заранее объявлять переменную PYTHONPATH. #basic

Hashtags

Резултати

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

Пребарај: #writer

当前筛选 #writer清除筛选

🗓🇿🇦November 20 marks the birthday of Nadine Gordimer (1923–2014), one of South Africa’s most influential English-language writers. 🏅 Recipient of the 1991 Nobel Prize in Literature. ✊ A committed member of the African National Congress and an active voice in the struggle against apartheid. ⚖️ In 1964, Gordimer helped prepare Nelson Mandela’s defense speech for the Rivonia Trial. 📖 While in prison, Mandela wrote: “I read all of Nadine Gordimer’s novels that were not banned.” ✍️ In 1987, she played a key role in establishing the Congress of South African Writers (COSAW), an important cultural platform during the final years of apartheid. 🌍 Her work remains a powerful testament to the pursuit of freedom, justice, and human dignity. 📸 Photo: Wikipedia #SouthAfrica#Literature#NobelPrize#Writer#HumanRights#History

iGaming Freelance Content Writers/Translators (Native Speakers) #remote#удаленно#iGaming#content#writer#tango We’re looking for iGaming Freelance Content Writers/Translators (Native Speakers). Our digital holding is expanding and we’re looking for native Filipino speaking translators & writers for iGaming projects. You’re a perfect fit if you have: • 1+ year of proven experience in iGaming translation or content writing • Solid understanding of iGaming terminology and cultural specifics of your region • Native fluency in #Filipino + strong English (for reading source materials) • Ability to start immediately and meet deadlines reliably What you’ll do: • Translate and localize website content (JSON format) from English • Adapt texts considering cultural/linguistic nuances • Proofread and edit content as needed We offer: • Fully remote freelance / part-time work • Competitive rates (based on skills and experience) • Interesting tasks and professional team support • No test task – we trust your portfolio Let’s connect! ⏺Apply: @IvanRecruiter ➖➖➖➖➖➖➖➖➖➖➖ 🪩 Откликнуться быстрее других ➖➖➖➖➖➖➖➖➖➖➖

Desi Memes Funny Jokes

@DESI_MEMES_Funny_Jokes · Post #5485 · 19.10.2024 г., 11:09

. . . . . #attitude#explore#tranding#reelsinstagram#viwe#relatable#exploreindia#relationshipquotes#reelkarofeelkaro#reelsolve#writer#lovereel#motivationlife#motivationalquotes#exploreing#explorepage#brokenheart#sayari#feelitreelit#reelslovers#exploreindonesia#exploreindia#100kfollowers#instagram#fashion#foryou#viralreels