@sgmrt · Post #2330 · 23.04.2025 г., 01:09
[EWL] CLEARED: Train service between #Tampines and #PasirRis have resumed. Free regular bus service ceased. - 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
Пребарај: #pasirris
@sgmrt · Post #2330 · 23.04.2025 г., 01:09
[EWL] CLEARED: Train service between #Tampines and #PasirRis have resumed. Free regular bus service ceased. - SMRT
@sgmrt · Post #2329 · 23.04.2025 г., 00:59
[EWL] UPDATE: Fault cleared. Train service resumed. Free regular bus service is still available between #Tampines and #PasirRis. - SMRT
@sgmrt · Post #2325 · 23.04.2025 г., 00:09
[EWL] UPDATE: Please add 10 mins train travel time between #Tampines and #PasirRis, in both directions due to track point fault. Free regular bus and shuttle train services are available between #Tampines and #PasirRis. Normal train service is available for the rest of East West - SMRT
@sgmrt · Post #2324 · 22.04.2025 г., 23:44
[EWL] UPDATE: Please add 10 mins train travel time between #Tampines and #PasirRis, in both directions due to track point fault. Free regular bus services are available between #Tampines and #PasirRis. Shuttle train service is also available between #Tampines and #PasirRis. Train - SMRT
@sgmrt · Post #2323 · 22.04.2025 г., 23:29
[EWL]: Pls add an additional 10 mins of travelling time between #Tampines and #PasirRis. The eastbound train will turn around at #Tampines towards westbound. Free regular bus services are available between #Tampines and #PasirRis. Shuttle train service is also available between - SMRT
@sgmrt · Post #2322 · 22.04.2025 г., 23:29
[EWL]: Pls add an additional 10 mins of travelling time between #Tampines and #PasirRis. The eastbound train will turn around at #Tampines towards westbound. Free regular bus services are available between #Tampines and #PasirRis. Shuttle train service is also available between https://bit.ly/4jEYkYR - SMRT
@sgmrt · Post #2321 · 22.04.2025 г., 23:24
[EWL] UPDATE: Train svc is available btwn #Tampines and #PasirRis. Please add 10 mins train travel time from Tampines to Pasir Ris, towards Pasir Ris due to track point fault. Free regular bus service is available between Tampines and Pasir Ris. - SMRT
@sgmrt · Post #2320 · 22.04.2025 г., 22:59
[EWL]: Due to a track point fault, pls add additional 10mins train travel time between #Tampines and #PasirRis. Free regular bus service is available between #Tampines and #PasirRis. - SMRT
@sgmrt · Post #2497 · 16.09.2025 г., 16:54
[EWL] UPDATE: Our station staff are assisting the last bridging bus passengers to transfer to the last train at #TanahMerah towards #PasirRis station. - SMRT
Hashtags
@sgmrt · Post #2421 · 06.08.2025 г., 00:59
[EWL] UPDATE: Due to a track point fault, please add additional 25mins train travelling time from #BoonLay to #BuonaVista towards #PasirRis. Free regular bus and bridging bus services are available between #BoonLay and #BuonaVista. - SMRT
Hashtags
@sgmrt · Post #2415 · 05.08.2025 г., 23:39
[EWL] UPDATE: Due to a track point fault, please add additional 25mins train travelling time from #BoonLay to #BuonaVista towards #PasirRis. Free regular bus & bridging bus services are available between #BoonLay and #BuonaVista. - SMRT
Hashtags
@sgmrt · Post #2413 · 05.08.2025 г., 23:19
[EWL] UPDATE: Due to a track point fault, pls add 25mins train travel time from #BoonLay to #BuonaVista towards #PasirRis. Free regular bus & free bridging bus svcs between #BoonLay and #BuonaVista. - SMRT
Hashtags