Metadata-Version: 2.4
Name: pythonpendrawer
Version: 2.2.2
Summary: A teaching-friendly Python drawing library based on turtle, designed for beginners.
Author-email: 11-year-old Coding Genius <pythonpen@example.com>
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/pythonpendrawer/
Project-URL: Repository, https://pypi.org/project/pythonpendrawer/
Project-URL: Documentation, https://pypi.org/project/pythonpendrawer/
Keywords: turtle,drawing,education,teaching,beginner,pythonpendrawer,chinese,bilingual
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0
Dynamic: license-file

# PythonPen — 让绘图像写字一样简单

> PythonPen is a lightweight drawing library that makes turtle graphics as easy as writing a sentence.

---

## 📋 项目简介 / Introduction

**中文：**  
PythonPen 是一个基于 Python `turtle` 的轻量级绘图库，专为初学者设计。  
它把复杂的 turtle 操作封装成简单直观的**中英双语 API**，让你专注"画什么"，而不是"怎么画"。

**English:**  
PythonPen is a lightweight drawing library built on Python's `turtle` module, designed for beginners.  
It wraps complex turtle operations into simple, intuitive **bilingual (Chinese/English) APIs**, so you can focus on *what* to draw, not *how*.

---

## 👤 作者 / Author

| 项目 / Item | 内容 / Value |
|---|---|
| 姓名 / Name | 11 岁的小程序员 / 11-year-old Coding Genius |
| 版本 / Version | **v2.2.2** |
| 更新日期 / Updated | 2026-08-20 |
| Python 版本 / Python | 3.8+（推荐 3.13+） |

---

## 📁 目录结构 / File Structure

```
PythonPenProject/                ← 项目根目录
├── README.md                   ← 你正在看的这个文件
├── CHANGELOG.md                ← 更新日志
├── demo.py                     ← 主演示程序（推荐从这里运行）
│
├── PythonPen/                  ← 核心库文件夹
│   ├── __init__.py             ← 库入口
│   ├── core.py                 ← 核心实现（Pen 类）
│   └── title_pic.ico           ← 内置铅笔图标
│
└── icon_helper/                ← 图标急救包（可选）
    ├── README.txt              ← 图标问题说明书
    ├── make_icon.py            ← 生成标准 ICO
    ├── fix_icon.py             ← 修复 ICO 尺寸
    ├── check_icon.py           ← 检查 ICO 内容
    └── clean.py                ← 清理缓存
```

---

## 🚀 安装 / Installation

> PythonPen **不需要** `pip install`，纯绿色，解压即用。

**中文：**
1. 确保已安装 Python 3.8 或更高版本
2. 把整个 `PythonPenProject` 文件夹放在任意位置
3. 在 `PythonPenProject` 目录下运行代码即可

**English:**
1. Make sure Python 3.8+ is installed
2. Place the entire `PythonPenProject` folder anywhere
3. Run your code from inside the `PythonPenProject` directory

---

## ⚡ 快速开始 / Quick Start

打开终端，进入项目目录：

```bash
cd PythonPenProject
```

运行主演示程序：

```bash
python demo.py
```

你会看到 / You will see：
- ✅ 一个绘图窗口弹出 / A drawing window pops up
- ✅ 窗口显示 PythonPen 图标 / PythonPen icon in the title bar
- ✅ 依次展示 5 个演示场景 / 5 demo scenes play in sequence
- ✅ 点击窗口关闭 / Click the window to exit

---

## 📖 基本用法 / Basic Usage

### 中文模式（默认）/ Chinese Mode (Default)

```python
from PythonPen import Pen

pen = Pen(lang="ch")
pen.pen_forward(100)
pen.pen_right(90)
pen.draw_circle(50)
pen.screen_exitonclick()
```

### English Mode

```python
from PythonPen import Pen

pen = Pen(lang="en")
pen.pen_forward(100)
pen.pen_right(90)
pen.draw_circle(50)
pen.screen_exitonclick()
```

### 不使用内置图标 / Disable Built-in Icon

```python
pen = Pen(lang="ch", use_default_icon=False)
```

### 使用自定义图标 / Use Custom Icon

```python
pen = Pen(lang="ch", use_default_icon=False)
pen.set_icon(r"C:\path\to\your_icon.ico")
```

---

## 🎨 内置功能一览 / Feature Reference

### 📋 数学常量 / Math Constants
```
self.E, self.I, self.PI, self.PHI, self.SQRT2
```

### 🎨 基础控制 / Basic Control
```
bg, style, set_icon, lang
```

### 🚀 画笔移动 / Pen Movement
```
pen_forward, pen_backward, pen_left, pen_right
pen_goto, pen_home, pen_setheading
```

### 📍 画布与状态 / Canvas & State
```
pen_clear, pen_reset, pen_pos
pen_save_state, pen_restore_state
pen_tracer, pen_update
```

### 🖊️ 文本与交互 / Text & Interaction
```
pen_write, pen_stamp, pen_clear_stamp
pen_num_input, pen_text_input
pen_set_title, pen_delay
```

### 🌈 时间与颜色 / Time & Color
```
show_detailed_time, set_color_mode, get_color_mode
random_color, random_int, random_float
random_choice, random_shuffled
```

### ▣ 窗口控制 / Window Control
```
screen_exitonclick, screen_mainloop, screen_bye
```

### 🔺 基础图形 / Basic Shapes
```
draw_circle, draw_square, draw_rectangle
draw_equilateral_triangle, draw_isosceles_triangle
draw_polygon
```

### 🔷 高级图形 / Advanced Shapes
```
draw_star, draw_python_logo
draw_colorful_spiral, draw_rainbow
draw_maze, draw_random_art
```

### 🎯 工具与扩展 / Utilities
```
drawing_challenge, help
```

---

## 🖼️ 图标问题？/ Icon Issues?

如果你发现图标不显示、是灰色的、或改了没变化，请查看：

```
icon_helper/README.txt
```

里面有一整套工具，专门解决图标问题。  
The `icon_helper/` folder contains a complete toolkit for icon troubleshooting.

---

## 💡 设计理念 / Design Philosophy

| # | 中文 | English |
|---|---|---|
| 1 | **简单优先** — API 直觉化，零门槛上手 | **Simplicity First** — Intuitive APIs, zero learning curve |
| 2 | **双语支持** — 中英文无缝切换 | **Bilingual** — Seamless Chinese/English switching |
| 3 | **零依赖** — 仅用标准库，无需 pip | **Zero Dependencies** — Standard library only |
| 4 | **优雅退出** — 窗口关闭不报错 | **Graceful Exit** — No errors on window close |
| 5 | **用户可控** — 图标、语言、样式全可选 | **User Empowerment** — Icon, language, style all optional |

---

## 🙏 致谢 / Acknowledgements

**中文：**  
感谢 Python `turtle` 模块，  
感谢所有帮助测试的人，  
感谢每一个用代码创造美好的你。

**English:**  
Thanks to the Python `turtle` module,  
thanks to everyone who helped test,  
and thanks to **you** — creating beauty with code.

---

## 📄 License

MIT License — 随便用，随便改，注明出处就行。  
MIT License — Free to use, modify, and share. Just keep the attribution.

---

<div align="center">

**"代码是写给人看的，顺便给机器执行。"**  
*"Code is written for humans, machines just happen to run it."*

🖤🐢 **PythonPen v2.2.2** — by 11-year-old Coding Genius

</div>
