← 返回
未分类 中文

Python Cookbook

Python code patterns and recipes for everyday tasks. Use when you need file I/O snippets, list comprehensions, decorators, async functions, regex patterns, d...
Python 代码模式和常用代码片段,适用于日常任务。需要文件读写、列表推导式、装饰器、异步函数、正则表达式等代码时使用。
loutai0307-prog
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 655
下载
💾 2
安装
1
版本
#latest

概述

python-cookbook

Triggers on

python snippet, python code pattern, file io python, list comprehension, decorator, async python, python regex, debug python, lint python, format python

What This Skill Does

Search and display common Python code recipes, run code snippets, check syntax, auto-format files, and look up solutions for common Python errors.

Commands

snippet

Search or browse built-in code snippets (file-read, file-write, json, list, dict, decorator, async, regex, date, and more).

bash scripts/script.sh snippet [keyword]
bash scripts/script.sh snippet decorator

run

Execute a Python code snippet inline or from a file.

bash scripts/script.sh run 'print("hello world")'
bash scripts/script.sh run @script.py

lint

Check Python file syntax using py_compile.

bash scripts/script.sh lint <file.py>

format

Auto-format a Python file using black (falls back to autopep8).

bash scripts/script.sh format <file.py>

debug

Show solutions for common Python errors (NameError, TypeError, IndexError, etc.).

bash scripts/script.sh debug [ErrorName]
bash scripts/script.sh debug TypeError

help

Show all available commands.

bash scripts/script.sh help

Requirements

  • bash 4+
  • python3 (standard library)
  • black or autopep8 (optional, for format command)

Powered by BytesAgain | bytesagain.com

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-01 20:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Bytesagain Mindmap

loutai0307-prog
从缩进文本大纲生成 ASCII 思维导图,直接在终端中可视化层级结构或导出为 Markdown。
★ 0 📥 694

R Analyst

loutai0307-prog
基于 Python 3 的 R 风格统计分析。用于计算描述性统计、生成 ASCII 直方图、计算相关矩阵等。
★ 0 📥 572

Bytesagain Chart Generator

loutai0307-prog
在终端根据CSV或内联数据生成ASCII柱状图、折线图、饼图和散点图。用于可视化数据集、绘制趋势、比较数值等。
★ 0 📥 559