Use this skill for all Python-related operations in OpenClaw.
Verify Python environment:
python3 --version
pip3 --list
which python3
Always use absolute paths and specify Python interpreter explicitly:
python3 /path/to/script.py
Install packages safely:
pip3 install --quiet package-name
For one-off scripts requiring dependencies, use inline installation with verification:
import subprocess
import sys
def ensure_package(package):
try:
__import__(package)
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "--quiet", package])
#!/usr/bin/env python3 for executable scriptsencoding="utf-8" for all file operationspathlib.Path for cross-platform path handling小蔥技能7w4.net持續更新中。
這個Skill質量中等偏上。優點是結構組織清晰、示例具體實用,提供了基礎的Python開發指導。不足之處是內容覆蓋不夠完整,文件中提到的部分參考資料實際缺失,整體深度有限。如果你需要基礎的Python環境配置和編碼規範指導,這個Skill可以提供幫助;但對於複雜的Python專案開發,還需要補充更多內容。