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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #303 · 27 дек.

Наверняка вы замечали, что в Python есть удобная функция для получения переменной окружения os.getenv(NAME) И её "сестра" для создания или изменения переменных окружения os.putenv(NAME, VALUE) Но почему-то putenv() не работает как должно. Энвайромент не обновляется! os.putenv('MYVAR', '1') print(os.getenv('MYVAR')) ... и ничего 😴 Почему так? На самом деле энвайромент обновляется, но это значение не добавляется в словарь os.environ. Откройте исходник функции os.getenv(). Это просто шорткат для os.environ.get() В то время как putenv() это built-in С-функция. Словарь os.environ (или точней класс из MutableMapping) создаётся из энвайромента в момент инициализации. Функция putenv() самостоятельно его не изменяет. В тоже время, когда вы создаёте или изменяете ключ в os.environ, автоматически вызывается putenv() в методе __setitem__(). То есть, технически putenv() всё делает верно, но в os.environ это не отражается. Можно проверить так: >>> os.putenv('MYVAR', '123') >>> os.system('python -c "import os;print(os.getenv(\'MYVAR\'))"') 123 Я объявил переменную в текущем процессе и вызвал дочерний процесс, который её унаследовал и получил в составе os.environ. Аналогично при удалении переменной вызывается еще одна built-in функция unsetenv(), удаляющая переменную из системы. Итого ▫️ Удобней всего явно обновлять переменные через os.environ ▫️ Есть способ неявно создать/удалить переменную через putenv/unsetenv, что не повлияет на os.environ но изменит энвайромент и передаст изменения сабпроцессам. Но так лучше не делать! ▫️os.environ это просто обертка для built-in функций putenv() и unsetenv(). #basic

Hashtags

Резултати

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

Пребарај: #webui

当前筛选 #webui清除筛选

#Clash#ClashMeta#WebUI#metacubexd#Yacd GH 页面自定义域:http://d.metacubex.one GH 页面:https://metacubex.github.io/metacubexd Cloudflare 页面:https://metacubexd.pages.dev 省流(个人认为体验优于Yacd): - 在Connections的功能相当丰富,功能体验最优(无法全部显示时,Shift+滚轮 可以横向滚动) - Proxies界面节点延迟可视化显示 - 还有一些其他Web UI所没有的功能 来源(ClashMeta官方支持)

GitHub Trends

@githubtrending · Post #14906 · 03.07.2025 г., 13:00

#typescript#ai#anthropic#artifacts#assistant_api#aws#azure#chatgpt#chatgpt_clone#claude#clone#dall_e_3#deepseek#gemini#google#librechat#o1#openai#plugins#vision#webui LibreChat is a free, open-source AI chatbot platform that lets you use many AI models like OpenAI, Anthropic, and AWS in one place. It offers advanced features such as secure code execution in multiple programming languages, AI assistants that can handle files and tools without coding, and the ability to generate images and diagrams directly in chat. You can search conversations easily, manage multiple chat threads, and customize the interface to fit your needs. LibreChat supports multiple languages, speech input/output, and secure multi-user access. It can be deployed locally or on the cloud, giving you flexibility and control over your AI experience. This means you get a powerful, customizable AI assistant without needing to pay for ChatGPT Plus or rely on a single provider[1][3][5]. https://github.com/danny-avila/LibreChat

GitHub Trends

@githubtrending · Post #15418 · 16.01.2026 г., 12:00

#typescript#acp#ai#ai_agent#banana#chat#chatbot#claude_code#codex#cowork#excel#gemini#gemini_cli#gemini_pro#llm#multi_agent#nano_banana#office#qwen_code#skills#webui AionUi is a free, open-source app that gives your CLI AI tools like Gemini CLI, Claude Code, and Qwen Code a simple graphical interface on macOS, Windows, or Linux. It auto-detects them for easy chatting, saves talks locally with multi-sessions, organizes files smartly, previews 9+ formats like PDF or code instantly, generates/editing images, and offers web access. You benefit by ditching complex commands for quick, secure AI help in office tasks, coding, or data work—saving time and boosting productivity without data leaving your device. https://github.com/iOfficeAI/AionUi

BotsGram®

@botsgram_cu · Post #3169 · 25.11.2020 г., 16:40

@channely_bot Qué puede hacer este bot? Este bot es el mejor asistente para la gestión de canales en Telegram. Conecto los canales al servicio principal. ¡Incluyendo un rico entorno webUI de edición! https://app.channely.co/ Idioma: Inglés (visto en @BotsGram.cu) #canales, #canal, #gestión, # administración, #richeditor, #posts, #schedule, #polls, #comment, #commenting, #reactions, #editor, #share, #buttons, #webui, #subscribe, #stats, #users, #trial, #limited, #proaccount