@sgmrt · Post #1990 · 04.07.2024 г., 00:09
[EWL] CLEARED: Train svcs from #BoonLay to #Clementi have resumed. Free regular bus & free bridging bus svcs have ended. - SMRT
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #201 · 13 јан.
Мы уже знаем, что на текущую сессию интерпретатора изменение PYTHONPATH никак не повлияет. Но если вы запустите дочерний процесс, то он унаследует окружение текущего процесса, а значит и изменения в любых переменных будут на него влиять. Вот небольшой пример: Объявляем переменную user@host:~$ export PYTHONPATH=/path1 Запускаем интерпретатор user@host:~$ python3 Проверим что в sys.path >>> import sys >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Добавляем что-то в переменную >>> import os >>> os.emviron['PYTHONPATH'] = '/path1:/path2' >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Изменений нет. Но давайте запустим дочерний процесс и посмотрим там >>> os.system('python3') # теперь мы находимся в другом процессе >>> import sys >>> print(sys.path) ['', '/path1', '/path2', '/usr/lib/...', ...] Тоже самое будет и с subprocess, так как по умолчанию текущее окружение тоже наследуется. >>> import subprocess >>> subprocess.call(['python3', '-c', 'import sys;print(sys.path)']) ['', '/path1', '/path2', '/usr/lib/...', ...] ______________________ Лучшей практикой является передача энвайронмента явно через аргумент env! import subprocess subprocess.call(cmd, env={'PYTHONPATH': '...'}) Это поможет точно понимать какое окружение будет у запускаемого процесса и при этом не изменять окружение текущего процесса. #basic
Hashtags
Пребарај: #clementi
@sgmrt · Post #1990 · 04.07.2024 г., 00:09
[EWL] CLEARED: Train svcs from #BoonLay to #Clementi have resumed. Free regular bus & free bridging bus svcs have ended. - SMRT
@sgmrt · Post #1989 · 04.07.2024 г., 00:04
[EWL] UPDATE: Fault on the EWL has cleared, train service has resumed. Free regular bus and bridging bus services are still available between #BoonLay & #Clementi. - SMRT
@sgmrt · Post #1988 · 03.07.2024 г., 23:54
[EWL] UPDATE: Fault on the EWL has cleared, train services are progressively returning to normal speed. Free regular bus & bridging bus services are still available between #BoonLay & #Clementi. - SMRT
@sgmrt · Post #1987 · 03.07.2024 г., 23:54
[EWL] UPDATE: Fault on the EWL has cleared, train services are progressively returning to normal. Free regular bus and bridging bus services are still available between #BoonLay and #Clementi. - SMRT
@sgmrt · Post #2409 · 05.08.2025 г., 22:05
[EWL]: Due to a track point fault, pls add 15mins train travel time from #BoonLay to #Clementi towards #PasirRis. - SMRT
@sgmrt · Post #1985 · 03.07.2024 г., 23:14
[EWL] UPDATE: Due to a track fault, pls add 30mins train travel time from #BoonLay to #Clementi towards #PasirRis. Free regular bus & free bridging bus svcs are available btwn #BoonLay and #Clementi. - SMRT
@sgmrt · Post #1984 · 03.07.2024 г., 23:14
[EWL] UPDATE: Due to a track fault, pls add 20mins train travel time from #BoonLay to #Clementi towards #PasirRis. Free regular bus & bridging bus svcs are available btwn #BoonLay and #Clementi. - SMRT
@sgmrt · Post #1980 · 03.07.2024 г., 22:24
[EWL] UPDATE: Train svc is available from #BoonLay to #Clementi towards #PasirRis. Free regular bus svcs from #BoonLay to #Clementi. Our station staff will assist. - SMRT
@sgmrt · Post #1979 · 03.07.2024 г., 22:24
[EWL]: Due to a track fault, pls add 20mins train travel time from #BuonaVista to #Clementi towards #PasirRis. Free regular bus svcs from #BuonaVista to #Clementi. Our station staff will assist. - SMRT
Hashtags
@sgmrt · Post #1982 · 03.07.2024 г., 22:39
[EWL] UPDATE: Due to a track fault, pls add 20mins train travel time from #BoonLay to #Clementi towards #PasirRis. Free regular bus svcs btwn #BoonLay and #Clementi. Passengers travelling towards city area, please and take North South Line towards #AngMoKio and #MarinaSouthPier. - SMRT
@sgmrt · Post #1981 · 03.07.2024 г., 22:34
[EWL]: UPDATE: Due to a track fault, pls add 20mins train travel time from #BoonLay to #Clementi towards #PasirRis. Free regular bus svcs from #BoonLay to #Clementi. Passengers travelling towards city area, please take North South Line towards #AngMoKio and #MarinaSouthPier. - SMRT
@sgmrt · Post #2293 · 04.04.2025 г., 05:34
[EWL]: Due to a track fault, please expect an additional 20mins of travelling time between #Queenstown and #BoonLay. Shuttle train are available between #Clementi and #JurongEast and #JurongEast and #Lakeside. Free regular bus is available between #BuonaVista and #BoonLay. - SMRT