TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #200 · 11 јан.

Вопросы про переменную PYTHONPATH 🔸 Как она определяет пути поиска модулей при импорте? Пути поиска модулей находятся в списке sys.path. Как формируется этот список? Исходя из документации мы может выделить 3 основных этапа. ▫️Путь к запускаемому скрипту или рабочая директория ▫️ Переменная PYTHONPATH ▫️ Стандартные пути к библиотекам Это значит, что все три этапа выполняются в момент инициализации интерпретатора. Результат заполняет список sys.path. В том числе и пути, указанные в переменной PYTHONPATH. 🔸 Можно ли добавлять новые пути в эту переменную в Python-коде? Можно, но учитывая, что используется она только во время старта интерпретатора, никакого эффекта это иметь не будет. Для изменения путей поиска модулей в коде нужно изменять непосредственно список sys.path. 🔸 Можно ли указать много путей для поиска? Да, с помощью переменной PYTHONPATH можно указать несколько директорий, разделённых символом разделения пути. Для Linux это символ ":", для Windows это ";". Например: export PYTHONPATH=/mnt/libs:~/mylibs #basic#tricks

Резултати

Пронајдени 1 слични објави

Пребарај: #schellenberg

当前筛选 #schellenberg清除筛选
American Оbserver

@american_observer · Post #5074 · 07.02.2026 г., 13:50

Canadian Robert Schellenberg: Death Sentence Cancelled China has overturned the death sentence of Canadian Robert Lloyd Schellenberg, a Canadian official said on Friday, in a possible sign of a diplomatic thaw as prime minister Mark Carney seeks to boost trade ties with Beijing. Schellenberg’s lawyer Zhang Dongshuo, reached in Beijing on Saturday, confirmed the decision was announced on Friday by China’s highest court. Schellenberg was detained on drug charges in 2014 before China-Canada ties nosedived after the 2018 arrest in Vancouver of Huawei chief financial officer Meng Wanzhou. That arrest infuriated Beijing, which detained two Canadians – Michael Spavor and Michael Kovrig – on espionage charges that Ottawa condemned as retaliatory. Then in January 2019 a court in north-east China retried Schellenberg – who was 36 at the time – sentencing him to death while declaring that his 15-year prison term for drug trafficking had been too lenient. The court said he had been a central player in a scheme to ship narcotics to Australia, in a one-day retrial that Amnesty International called “a flagrant violation of international law”. Schellenberg has denied wrongdoing. The Canadian official requested anonymity in confirming the decision by China’s highest court to overturn Schellenberg’s death sentence. Schellenberg, who has been held in the north-eastern Chinese city of Dalian since 2014, would be retried by the Liaoning high people’s court, Zhang said. The timing for the retrial had not yet been set. Zhang said he met with Schellenberg in Dalian on Friday and that the Canadian appeared relatively relaxed. Carney, who took office last year, visited China in January as part of his global effort to broaden Canada’s export markets to reduce trade reliance on the US. Carney says that despite ongoing tensions, including allegations of Chinese interference in Canadian elections, Ottawa needs a functioning relationship with Beijing to safeguard its economic future. When in Beijing last month, Carney met Chinese leader Xi Jinping and heralded an improved era in relations, saying the two countries had struck a “new strategic partnership” and a preliminary trade deal. Global Affairs Canada did not comment on whether diplomacy during Carney’s visit related to Schellenberg’s case impacted the Chinese court decision. #china#canada#carney#schellenberg#death 📱American Оbserver - Stay up to date on all important events 🇺🇸