Python Support

👤 terrycarter1985 📦 v1.0.0 ⭐ 3.9 ⬇️ 1.1K 下載
💻 開發程式設計 免費

📖 技能介紹

Python Support

Quick Start

Use this skill for all Python-related operations in OpenClaw.

Environment Check

Verify Python environment:

python3 --version
pip3 --list
which python3

Running Scripts

Always use absolute paths and specify Python interpreter explicitly:

python3 /path/to/script.py

Dependency Management

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])

Best Practices

  1. Shebang: Use #!/usr/bin/env python3 for executable scripts
  2. Error handling: Always include try/except blocks for external operations
  3. Encoding: Specify encoding="utf-8" for all file operations

    小蔥技能站7w4.net每天更新,海量AI技能等你發現。

  4. Paths: Use pathlib.Path for cross-platform path handling
  5. Output: Prefer JSON or machine-readable formats for structured output

References

🤖 AI 評測

這個Skill質量中等偏上。優點是結構組織清晰、示例具體實用,提供了基礎的Python開發指導。不足之處是內容覆蓋不夠完整,文件中提到的部分參考資料實際缺失,整體深度有限。如果你需要基礎的Python環境配置和編碼規範指導,這個Skill可以提供幫助;但對於複雜的Python專案開發,還需要補充更多內容。

📊 多維度評分

適應性3.4
規範性3.9
有效性3.9
可靠性3.9
可信度4.3

📁 包含檔案 (3 個)

📄 SKILL.md 1.7 KB
📄 _meta.json 133 B
📄 references/style-guide.md 880 B