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

TGINSIGHT SIMILAR POSTS

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

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

Первая директория в sys.path 🔸 Когда вы запускаете Python-интерпретатор в интерактивном режиме, в системные пути (sys.path) в самое начало добавляется текущая рабочая директория >>> for path in sys.path: ... print(f'"{path}"') "" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Первая строка пустая, что и означает текущую рабочую директорию. 🔸 Если вы запускаете интерпретатор передавая скрипт как аргумент, то история получается иная. На первом месте будет директория в которой располагается скрипт. А текущая рабочая директория игнорируется. Пишем скрипт с таким содержанием: # script.py import sys for path in sys.path: print(f'"{path}"') Запускаем python3 /home/user/dev/script.py Получаем "/home/user/dev" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... 🔸 Если вы запускаете скрипт по имени модуля то на первом месте будет домашняя директория текущего юзера python3 -m script "/home/user" "/usr/lib/python37.zip" "/usr/lib/python3.7" ... Скрипт должен быть доступен для импорта На что это влияет? На видимость модулей для импорта. Если вы ждёте, что, запустив скрипт по пути, сможете импортировать модули из текущей рабочей директории, то вы ошибаетесь. Придётся добавлять путь os.getcwd() в sys.path самостоятельно или заранее объявлять переменную PYTHONPATH. #basic

Hashtags

Резултати

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

Пребарај: #sveltekit

当前筛选 #sveltekit清除筛选
GitHub Trends

@githubtrending · Post #15079 · 20.08.2025 г., 12:30

#typescript#svelte#sveltekit#tailwindcss#tauri Epicenter is a free, open-source set of local-first apps that let you own and control your data by storing everything—notes, transcripts, chats—in one simple folder using plain text and SQLite. You can use any AI model you want, customize tools, and access your data anywhere without relying on cloud services. Key apps include Whispering, which transcribes your speech locally, and epicenter.sh, a personal assistant that helps you search and interact with your data. This setup gives you privacy, flexibility, and full control over your information, avoiding locked, siloed apps and data traps. It’s great for anyone who values data ownership and open software. https://github.com/epicenter-so/epicenter

折腾实验室频道

@TossLabChannel · Post #424 · 22.12.2024 г., 03:30

#局域网唤醒#SvelteKit#Go#PocketBase 简单局域网唤醒 Web 应用程序 该应用程序利用 SvelteKit、Go 和 PocketBase 构建,适合家庭或企业环境中需要设备唤醒和管理的用户。 ✨ 特点 • 🚀 一键设备唤醒仪表板 • ⏰ 定时事件自动化(通过 Cron 设置) • 🔌 支持 Ping 任意端口 • 🔍 网络扫描发现设备(需要 nmap) • 👤 安全的用户管理 • 🌐 多语言支持(i18n) • 🎨 提供 29 种主题 • 🐳 支持多平台 Docker 镜像 • 🏠 完全自托管 📢 群聊: @TossLab 🎈 频道: @TossLabChannel ❤️不想错过精彩内容,请打开 #频道通知,你的 #阅读#点赞#转发 便是我发帖的最大动力!

GitHub Trends

@githubtrending · Post #15236 · 19.10.2025 г., 12:30

#typescript#chatgpt#hacktoberfest#huggingface#llm#svelte#svelte_kit#sveltekit#tailwindcss#typescript Chat UI is an open-source chat interface built with SvelteKit that lets you easily connect to different AI language models using any service that works with the OpenAI API format, such as Hugging Face, llama.cpp, Ollama, or OpenRouter[5]. You can quickly set it up on your computer by cloning the project, setting a few environment variables (like your API key and database connection), and running simple commands to start the app—no need to be an expert[5]. The main benefit is that you get a modern, customizable chat app that works with many AI models, making it simple to experiment, build, and share your own AI-powered chat experiences without starting from scratch. https://github.com/huggingface/chat-ui