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 слични објави

Пребарај: #virtualization

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

@githubtrending · Post #15209 · 09.10.2025 г., 14:30

#typescript#docker#docker_compose#linux#rdp#virtualization#windows WinBoat lets you run any Windows app on Linux with a smooth, native-like experience by running a full Windows system inside a Docker container using virtualization. It has an elegant interface and automates installation, so you just pick your settings and it handles the rest. You can run individual Windows apps seamlessly alongside Linux apps or access the full Windows desktop when needed. Your Linux files are easily shared with Windows, making file management simple. This helps you use Windows-only software on Linux without complicated setups, though it requires some system resources and setup steps like enabling virtualization and installing Docker. WinBoat is still in beta, so occasional bugs may occur. https://github.com/TibixDev/winboat

AppPie

@AppPie · Post #2365 · 20.03.2025 г., 04:04

#Apps Cua: 在 Apple Silicon 上创建并运行高性能 macOS 和 Linux 虚拟机 🔗GitHub Cua 是一个用于在 Apple Silicon 芯片 Mac 上创建和运行高性能 macOS 和 Linux 虚拟机的工具集,内置支持 AI 代理,使智能应用能够与虚拟机环境交互。 项目还提供了详细的文档、安装指南、演示视频以及贡献指南。此外,项目还包括辅助库,如 Core、PyLume、Computer Server 和 SOM,以及 Jupyter Notebook 示例,用于展示如何使用计算机使用界面和代理。 主要组件 • Lume:用于运行 macOS/Linux 虚拟机的 CLI 工具,基于 Apple 的 Virtualization.Framework • Computer:用于与 macOS/Linux 沙箱交互的计算机使用界面(CUI)框架 • Agent (实验性):用于在专用 macOS/Linux 沙箱中运行代理工作流的计算机使用代理(CUA)框架 开源许可证 MIT License。 #App#macOS#GitHub#OpenSource#Linux#VM#AI#AppleSilicon#Virtualization 📮 频道 @AppPie

GitHub Trends

@githubtrending · Post #14711 · 15.05.2025 г., 14:00

#python#agent#ai_agent#apple#computer_use#cua#lume#macos#manus#operator#swift#virtualization#virtualization_framework The information provided doesn't directly relate to Discord bots or their benefits. However, if we consider the broader context of automation and AI tools like those mentioned in the text, these technologies can enhance user experiences by automating tasks and providing interactive features. For example, AI agents can control virtual environments, which might be useful in various applications, including gaming or educational settings. This kind of automation can save time and increase efficiency, similar to how Discord bots automate tasks and engage communities[1][2]. https://github.com/trycua/cua