@sgmrt · Post #2308 · 04.04.2025 г., 08:09
[EWL] UPDATE: Normal train services are progressively being restored. Free regular bus is available between #Queenstown and #BoonLay. - SMRT
Hashtags
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
Пребарај: #boonlay
@sgmrt · Post #2308 · 04.04.2025 г., 08:09
[EWL] UPDATE: Normal train services are progressively being restored. Free regular bus is available between #Queenstown and #BoonLay. - SMRT
Hashtags
@sgmrt · Post #2305 · 04.04.2025 г., 07:59
[EWL] UPDATE: Train services are progressively being restored. Free regular bus is available between #Queenstown and #BoonLay. - SMRT
Hashtags
@sgmrt · Post #2059 · 25.09.2024 г., 09:59
[EWL]:UPDATE Due to a power fault, there is no train svc between Jurong East and Buona Vista. Free regular bus & bridging bus services is still available between #BoonLay and #Queenstown. - SMRT
Hashtags
@sgmrt · Post #2046 · 25.09.2024 г., 07:29
[EWL]:UPDATE Due to a power fault, there is no train svc between #BoonLay and #Queenstown. Free regular bus & bridging bus services is still available between #BoonLay and #Queenstown. - SMRT
Hashtags
@sgmrt · Post #2043 · 25.09.2024 г., 06:44
[EWL]:UPDATE Free regular bus & bridging bus services are still available between #BoonLay and #Queenstown. Passengers with special needs, please approach our station staff for assistance. Our staff are attending to the matter. - SMRT
Hashtags
@sgmrt · Post #2042 · 25.09.2024 г., 06:29
[EWL]:UPDATE Due to a power fault, there is no train svc between #BoonLay and #Queenstown. We encourage fellow commuters to look out for persons with special needs. Please lend a helping hand and approach our station staff if you need further assistance. - SMRT
Hashtags
@sgmrt · Post #2035 · 25.09.2024 г., 04:44
[EWL]:UPDATE Free regular bus & bridging bus services are still available between #BoonLay and #Queenstown. Passengers with special needs, please approach our station staff for assistance. We are working to recover service. - SMRT
Hashtags
@sgmrt · Post #2034 · 25.09.2024 г., 04:24
[EWL]:UPDATE Due to a power fault, there is no train service between #BoonLay and #Queenstown. Free regular bus & bridging bus services are still available between #BoonLay and #Queenstown. We apologies for the inconvenience caused. - SMRT
Hashtags
@sgmrt · Post #2030 · 25.09.2024 г., 03:49
[EWL]:UPDATE Free regular bus & bridging bus services are still available between #BoonLay and #Queenstown. Passengers with special needs, please approach our station staff for assistance. We apologies to affect your commute. - SMRT
Hashtags
@sgmrt · Post #2019 · 25.09.2024 г., 02:09
[EWL]: Due to a power fault, there is no train service between #BoonLay and #Queenstown.Free regular bus & bridging bus services are available between #BoonLay and #Queenstown. - SMRT
Hashtags
@sgmrt · Post #2422 · 06.08.2025 г., 03:14
[EWL] CLEARED: Train services from #BoonLay to #BuonaVista have resumed. Free regular bus & free bridging bus services have ended. We apologise for affecting your commute. - SMRT
Hashtags
@sgmrt · Post #2420 · 06.08.2025 г., 00:39
[EWL] UPDATE: We continue to provide free regular bus and bridging bus services between #BoonLay and #BuonaVista station. - SMRT
Hashtags