@sgmrt · Post #1691 · 07.04.2023 г., 06:31
[CCL]: If you are at #DhobyGhaut and heading towards #PayaLebar, you may take the NSL and EWL instead. 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
Пребарај: #dhobyghaut
@sgmrt · Post #1691 · 07.04.2023 г., 06:31
[CCL]: If you are at #DhobyGhaut and heading towards #PayaLebar, you may take the NSL and EWL instead. Free regular bus and free bridging bus services are still available. - SMRT
Hashtags
@sgmrt · Post #1894 · 22.03.2024 г., 02:35
[CCL] UPDATE: Normal train service has resumed. Free regular bus service between #PayaLebar and #DhobyGhaut / #MarinaBay has ceased. - SMRT
Hashtags
@sgmrt · Post #1893 · 22.03.2024 г., 02:19
[CCL] UPDATE: Additional 20 mins train travel time from #PayaLebar to #DhobyGhaut / #MarinaBay, due to a train fault. Free regular bus service is available between #PayaLebar and #DhobyGhaut / #MarinaBay. - SMRT
Hashtags
@sgmrt · Post #1892 · 22.03.2024 г., 01:55
[CCL] UPDATE: Additional 30 mins train travel time from #PayaLebar to #DhobyGhaut / #MarinaBay, due to a train fault. Free regular bus service are available between #PayaLebar and #DhobyGhaut / #MarinaBay. - SMRT
Hashtags
@sgmrt · Post #1884 · 08.02.2024 г., 03:14
[CCL] UPDATE: Due to a signal fault, please add additional 20 minutes travel time between #DhobyGhaut, #MarinaBay and #PayaLebar. Free regular bus services are available between #DhobyGhaut, #MarinaBay and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1883 · 08.02.2024 г., 02:19
[CCL] UPDATE: Due to a signal fault, please add additional 15 minutes travel time between #DhobyGhaut, #MarinaBay and #PayaLebar. Free regular bus services are available between #DhobyGhaut, #MarinaBay and #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1745 · 23.06.2023 г., 21:19
[CCL] UPDATE: Normal train services between #DhobyGhaut / #MarinaBay and #PayaLebar have resumed. - SMRT
Hashtags
@sgmrt · Post #1744 · 23.06.2023 г., 16:33
[CCL] UPDATE: Train services have ended between #DhobyGhaut / #MarinaBay and #PayaLebar. Free regular bus and bridging bus have ceased. - SMRT
Hashtags
@sgmrt · Post #1736 · 23.06.2023 г., 14:19
[CCL] : [Update] Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free regular bus services are available between #DhobyGhaut / #MarinaBay to #PayaLebar. Our engineers are still looking into the fault. - SMRT
Hashtags
@sgmrt · Post #1735 · 23.06.2023 г., 14:03
[CCL] : Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free regular bus services are available between #DhobyGhaut / #MarinaBay to #PayaLebar. - SMRT
Hashtags
@sgmrt · Post #1734 · 23.06.2023 г., 13:18
[CCL] CLEARED: Train services between #DhobyGhaut /#MarinaBay and #PayaLebar have resumed. Free regular bus & free bridging bus svcs have ceased. - SMRT
Hashtags
@sgmrt · Post #1732 · 23.06.2023 г., 13:03
[CCL] : Additional 30mins train travel time between #DhobyGhaut / #MarinaBay and #PayaLebar due to a signal fault. Free Regular Bus is available between #DhobyGhaut / #MarinaBay and #PayaLebar. - SMRT
Hashtags