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

TGINSIGHT SIMILAR POSTS

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

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

Вопросы про переменную PYTHONPATH 🔸 Как она определяет пути поиска модулей при импорте? Пути поиска модулей находятся в списке sys.path. Как формируется этот список? Исходя из документации мы может выделить 3 основных этапа. ▫️Путь к запускаемому скрипту или рабочая директория ▫️ Переменная PYTHONPATH ▫️ Стандартные пути к библиотекам Это значит, что все три этапа выполняются в момент инициализации интерпретатора. Результат заполняет список sys.path. В том числе и пути, указанные в переменной PYTHONPATH. 🔸 Можно ли добавлять новые пути в эту переменную в Python-коде? Можно, но учитывая, что используется она только во время старта интерпретатора, никакого эффекта это иметь не будет. Для изменения путей поиска модулей в коде нужно изменять непосредственно список sys.path. 🔸 Можно ли указать много путей для поиска? Да, с помощью переменной PYTHONPATH можно указать несколько директорий, разделённых символом разделения пути. Для Linux это символ ":", для Windows это ";". Например: export PYTHONPATH=/mnt/libs:~/mylibs #basic#tricks

Резултати

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

Пребарај: #november

当前筛选 #november清除筛选
悦读「优质少量RSS聚合」

@Dailyrss · Post #13181 · 27.11.2025 г., 00:45

Wikipedia每日一图(#November 27, 2025)https://ift.tt/Wg6MXxG A shattered ceiling light fixture on a bamboo floor mat. The lamp was a semi flush mounted light fixture with a shallow glass dome of clear glass coated with white glass on the inside. In the fixture are LED light bulbs with E27 Edison screw. The hook in the ceiling suddenly came lose one day and the lamp crashed to the floor in an apartment in Brastad, Lysekil Municipality, Sweden. Photographed in natural light from the window. Focus stacked from 10 photos.. 了解更多 . #Wikipedia每日一图

悦读「优质少量RSS聚合」

@Dailyrss · Post #13177 · 23.11.2025 г., 00:45

Wikipedia每日一图(#November 23, 2025)https://ift.tt/9zNt12M A full-size test article of the SpaceX Crew Dragon named DragonFly fires its eight SuperDraco engines in a development test of its ability to land with the accuracy of a helicopter using only the thrusters. The company conducted two tethered tests vehicle attached to a crane so engineers could refine the landing software and systems on the spacecraft. SpaceX envisions returning people to Earth from space on the power of thrust instead of beneath parachutes. SpaceX, in partnership with NASA’s Commercial Crew Program, is developing the Crew Dragon and Falcon 9 integrated system to take astronauts to launch astronauts to the International Space Station from the United States.. 了解更多 . #Wikipedia每日一图

123•••56
ПретходнаСтраница 1 од 6Следна