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

Резултати

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

Пребарај: #taxtech

当前筛选 #taxtech清除筛选
IRAS

@irassg · Post #1005 · 14.05.2024 г., 06:56

#LifeatIRAS goes beyond just ticking off tasks; it's a vibrant journey filled with continuous learning and collaborative opportunities! 🌟 Techies, this one's for you! 👨‍💻 Tune in to the full video where Steven and Chanel spill the tea on the pivotal role of techies in the tax industry: https://youtu.be/OWWZ1Z6xUlc #WhyIDoWhatIDo#IRASGameOn#irassg#taxtech#techroles#careerideas

IRAS

@irassg · Post #1004 · 13.05.2024 г., 06:35

The weather has been so hot 🥵🔥 Who else wants to work in a cold room too? 🙋 Learn more about what Shaun and Sakthi do and why they choose #lifeatIRAS: https://www.youtube.com/watch?v=KGDBnQv31WA Find your role with us at go.gov.sg/lifeatiras💡⭐️ #WhyIDoWhatIDo#IRASGameOn#irassg#taxtech#beattheheat#careerideas

IRAS

@irassg · Post #1003 · 10.05.2024 г., 04:31

Quote Georgina, “Our work is NOT boring!” 😂 Watch the full video as Sanudha and Georgina dish more about their #lifeatIRAS experiences! Find your role with us at go.gov.sg/lifeatiras💡⭐️ #WhyIDoWhatIDo#IRASGameOn#irassg#interestingjobs#taxtech#careerideas

IRAS

@irassg · Post #1001 · 08.05.2024 г., 07:40

Ever wonder what's behind the scenes of tax investigation? 🕵️‍♂️ Our investigator, Jeremy, reveals his most intriguing tool – a door ram! 🚪 Watch the full video as Jeremy and Juliana explain the difference between a tax investigator and a tax auditor. Find your role with us at go.gov.sg/lifeatiras💡⭐️ #WhyIDoWhatIDo#IRASGameOn#irassg#taxtech#investigation#audit#careerideas#lifeatIRAS