@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
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
Пребарај: #buonavista
@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
@sgmrt · Post #2411 · 05.08.2025 г., 22:49
[EWL] UPDATE: Pls add 15mins train travel time from #BoonLay to #BuonaVista. We are working to recover svc. - SMRT
Hashtags
@sgmrt · Post #2295 · 04.04.2025 г., 05:54
[EWL] UPDATE: Passenger travelling between #BuonaVista and #BoonLay, please take the alternative route via Circle Line at #BuonaVista. - SMRT
Hashtags
@sgmrt · Post #2352 · 20.05.2025 г., 00:44
[CCL] UPDATE: Train fault has recovered, train services are progressively resuming. Free regular bus services are still available between #Serangoon and #BuonaVista. - SMRT
Hashtags
@sgmrt · Post #1703 · 18.04.2023 г., 08:37
[CCL] Train service is resuming progressively. Free regular buses are still available btw #BuonaVista and #HarbourFront. - SMRT
Hashtags
@sgmrt · Post #2301 · 04.04.2025 г., 07:14
[EWL] UPDATE: Due to a track fault, please expect an additional 20mins of travelling time between #Queenstown and #BoonLay. Passenger are advised to take the alternative route via Circle Line at #BuonaVista and North-South Line to city area. We apologise for the delay to your - SMRT
Hashtags
@sgmrt · Post #2298 · 04.04.2025 г., 06:44
[EWL] UPDATE: Due to a track fault, please expect an additional 20mins of travelling time between #Queenstown and #BoonLay. Passenger are advised to take the alternative route via Circle Line at #BuonaVista and North-South Line to city area. We apologized for the delayed to your - 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
@sgmrt · Post #2410 · 05.08.2025 г., 22:34
[EWL] UPDATE: Due to a track point fault, pls add 15mins train travel time from #BoonLay to #BuonaVista towards #PasirRis. Free regular bus svcs from #BoonLay to #BuonaVista. Our station staff will assist. - SMRT
Hashtags