@sgmrt · Post #1692 · 07.04.2023 г., 06:47
[CCL]: If you are at #Promenade, #Bayfront or #MarinaBay, you may take the TEL, DTL, or alternative modes of transport. Free regular bus and free bridging bus services are still available. - 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
Пребарај: #bayfront
@sgmrt · Post #1692 · 07.04.2023 г., 06:47
[CCL]: If you are at #Promenade, #Bayfront or #MarinaBay, you may take the TEL, DTL, or alternative modes of transport. Free regular bus and free bridging bus services are still available. - SMRT
Hashtags
@sgmrt · Post #1467 · 20.06.2022 г., 05:58
[CCL] UPDATE: Shuttle train service is available #Bayfront & #MarinaBay at Platform B. Passengers are advised to use DTL to continue their journey between #Bayfront and #Promenade. - SMRT
Hashtags
@sgmrt · Post #1466 · 20.06.2022 г., 05:43
[CCL]: Due to a track fault, additional 10 mins travelling time between #Promenade & #MarinaBay. Shuttle train service is available #Bayfront & #MarinaBay at Platform B. Passengers are advised to use DTL to continue their journey between #Bayfront and #Promenade. - SMRT
Hashtags
@sgmrt · Post #1690 · 07.04.2023 г., 06:15
[CCL]: Pls add 40mins of train travel time between #DhobyGhaut/#MarinaBay and #Stadium. Commuters are advised to take other lines such as DTL, NSL and NEL if you are at #DhobyGhaut, #MarinaBay, #Promenade or #Bayfront. Free regular bus and free bus bridging svcs are available. - SMRT
@sgmrt · Post #1740 · 23.06.2023 г., 15:33
[CCL] UPDATE: No train service between #Esplanade / #Bayfront and #Mountbatten. Additional 30 minutes between #DhobyGhaut and #Esplanade, #MarinaBay and #Bayfront, and #Mountbatten and #PayaLebar. Please use alternative means of transport to continue your journey. - SMRT
@sgmrt · Post #1738 · 23.06.2023 г., 14:58
[CCL] UPDATE : No train service between #Esplanade / #Bayfront and #Mountbatten. Additional 30 minutes between #DhobyGhaut and #Esplanade, #MarinaBay and #Bayfront, and #Mountbatten and #PayaLebar. - SMRT
@sgmrt · Post #2469 · 01.09.2025 г., 00:49
[CCL] UPDATE: Passengers travelling towards #MarinaBay, please transfer at #DhobyGhaut or #Bishan for the North-South Line, or #Caldecott for the Thomson-East Coast Line. Passengers travelling towards #Bayfront, please transfer at #Promenade or #MacPherson for the Downtown Line. - SMRT