├── .gitignore ├── LICENSE ├── PDF转Word.py ├── README.md ├── WEB ├── README.txt ├── http服务器.py ├── http论坛.py ├── netcat.py ├── tcp客户端.py ├── tcp服务器.py ├── udp客户端.py ├── udp服务器.py ├── 文件下载.py ├── 爬取csdn文章.py ├── 爬取csdn文章_gui.py ├── 爬取博客园文章.py ├── 爬取问题.py ├── 百度翻译_api.py └── 百度翻译_selenium.py ├── dist ├── README.txt ├── catch_turtle-1.1.4.tar.gz ├── check_&_upload.bat ├── console-tool-1.2.4.tar.gz ├── event-simulate-1.1.2.tar.gz ├── freegames-extended-2.3.4.tar.gz ├── lib │ ├── tcl8.6 │ │ ├── auto.tcl │ │ ├── clock.tcl │ │ ├── encoding │ │ │ ├── ascii.enc │ │ │ ├── big5.enc │ │ │ ├── cp1250.enc │ │ │ ├── cp1251.enc │ │ │ ├── cp1252.enc │ │ │ ├── cp1253.enc │ │ │ ├── cp1254.enc │ │ │ ├── cp1255.enc │ │ │ ├── cp1256.enc │ │ │ ├── cp1257.enc │ │ │ ├── cp1258.enc │ │ │ ├── cp437.enc │ │ │ ├── cp737.enc │ │ │ ├── cp775.enc │ │ │ ├── cp850.enc │ │ │ ├── cp852.enc │ │ │ ├── cp855.enc │ │ │ ├── cp857.enc │ │ │ ├── cp860.enc │ │ │ ├── cp861.enc │ │ │ ├── cp862.enc │ │ │ ├── cp863.enc │ │ │ ├── cp864.enc │ │ │ ├── cp865.enc │ │ │ ├── cp866.enc │ │ │ ├── cp869.enc │ │ │ ├── cp874.enc │ │ │ ├── cp932.enc │ │ │ ├── cp936.enc │ │ │ ├── cp949.enc │ │ │ ├── cp950.enc │ │ │ ├── dingbats.enc │ │ │ ├── ebcdic.enc │ │ │ ├── euc-cn.enc │ │ │ ├── euc-jp.enc │ │ │ ├── euc-kr.enc │ │ │ ├── gb12345.enc │ │ │ ├── gb1988.enc │ │ │ ├── gb2312-raw.enc │ │ │ ├── gb2312.enc │ │ │ ├── iso2022-jp.enc │ │ │ ├── iso2022-kr.enc │ │ │ ├── iso2022.enc │ │ │ ├── iso8859-1.enc │ │ │ ├── iso8859-10.enc │ │ │ ├── iso8859-13.enc │ │ │ ├── iso8859-14.enc │ │ │ ├── iso8859-15.enc │ │ │ ├── iso8859-16.enc │ │ │ ├── iso8859-2.enc │ │ │ ├── iso8859-3.enc │ │ │ ├── iso8859-4.enc │ │ │ ├── iso8859-5.enc │ │ │ ├── iso8859-6.enc │ │ │ ├── iso8859-7.enc │ │ │ ├── iso8859-8.enc │ │ │ ├── iso8859-9.enc │ │ │ ├── jis0201.enc │ │ │ ├── jis0208.enc │ │ │ ├── jis0212.enc │ │ │ ├── koi8-r.enc │ │ │ ├── koi8-u.enc │ │ │ ├── ksc5601.enc │ │ │ ├── macCentEuro.enc │ │ │ ├── macCroatian.enc │ │ │ ├── macCyrillic.enc │ │ │ ├── macDingbats.enc │ │ │ ├── macGreek.enc │ │ │ ├── macIceland.enc │ │ │ ├── macJapan.enc │ │ │ ├── macRoman.enc │ │ │ ├── macRomania.enc │ │ │ ├── macThai.enc │ │ │ ├── macTurkish.enc │ │ │ ├── macUkraine.enc │ │ │ ├── shiftjis.enc │ │ │ ├── symbol.enc │ │ │ └── tis-620.enc │ │ ├── history.tcl │ │ ├── http1.0 │ │ │ ├── http.tcl │ │ │ └── pkgIndex.tcl │ │ ├── init.tcl │ │ ├── opt0.4 │ │ │ ├── optparse.tcl │ │ │ └── pkgIndex.tcl │ │ ├── package.tcl │ │ ├── parray.tcl │ │ ├── safe.tcl │ │ ├── tclIndex │ │ ├── tm.tcl │ │ └── word.tcl │ └── tk8.6 │ │ ├── bgerror.tcl │ │ ├── button.tcl │ │ ├── choosedir.tcl │ │ ├── clrpick.tcl │ │ ├── comdlg.tcl │ │ ├── console.tcl │ │ ├── dialog.tcl │ │ ├── entry.tcl │ │ ├── focus.tcl │ │ ├── fontchooser.tcl │ │ ├── iconlist.tcl │ │ ├── icons.tcl │ │ ├── license.terms │ │ ├── listbox.tcl │ │ ├── megawidget.tcl │ │ ├── menu.tcl │ │ ├── mkpsenc.tcl │ │ ├── msgbox.tcl │ │ ├── obsolete.tcl │ │ ├── optMenu.tcl │ │ ├── palette.tcl │ │ ├── panedwindow.tcl │ │ ├── pkgIndex.tcl │ │ ├── safetk.tcl │ │ ├── scale.tcl │ │ ├── scrlbar.tcl │ │ ├── spinbox.tcl │ │ ├── tclIndex │ │ ├── tearoff.tcl │ │ ├── text.tcl │ │ ├── tk.tcl │ │ ├── tkfbox.tcl │ │ ├── ttk │ │ ├── altTheme.tcl │ │ ├── aquaTheme.tcl │ │ ├── button.tcl │ │ ├── clamTheme.tcl │ │ ├── classicTheme.tcl │ │ ├── combobox.tcl │ │ ├── cursors.tcl │ │ ├── defaults.tcl │ │ ├── entry.tcl │ │ ├── fonts.tcl │ │ ├── menubutton.tcl │ │ ├── notebook.tcl │ │ ├── panedwindow.tcl │ │ ├── progress.tcl │ │ ├── scale.tcl │ │ ├── scrollbar.tcl │ │ ├── sizegrip.tcl │ │ ├── spinbox.tcl │ │ ├── treeview.tcl │ │ ├── ttk.tcl │ │ ├── utils.tcl │ │ ├── vistaTheme.tcl │ │ ├── winTheme.tcl │ │ └── xpTheme.tcl │ │ ├── unsupported.tcl │ │ └── xmfbox.tcl ├── music-score-1.1.3.tar.gz ├── notepad-1.3.5.tar.gz ├── number-guessing-1.0.1.tar.gz ├── pickle │ ├── _ctypes.pyd │ ├── _tkinter.pyd │ ├── library.zip │ ├── pickle.ico │ ├── pklReader.exe │ ├── python37.dll │ ├── tcl86t.dll │ └── tk86t.dll ├── py2exe_con.py ├── py2exe_w.py ├── pycodeobject-1.0.5.tar.gz ├── pynotepad │ ├── _ctypes.pyd │ ├── _tkinter.pyd │ ├── library.zip │ ├── notepad.ico │ ├── pynotepad.exe │ ├── python37.dll │ ├── tcl86t.dll │ ├── tk86t.dll │ └── winsound.pyd ├── pyshell │ ├── _bz2.pyd │ ├── _ctypes.pyd │ ├── _hashlib.pyd │ ├── _lzma.pyd │ ├── _queue.pyd │ ├── _socket.pyd │ ├── _ssl.pyd │ ├── _tkinter.pyd │ ├── autoexec.py │ ├── libcrypto-1_1.dll │ ├── library.zip │ ├── libssl-1_1.dll │ ├── pyexpat.pyd │ ├── pyshell.exe │ ├── pyshell_w.exe │ ├── python37.dll │ ├── select.pyd │ ├── tcl86t.dll │ ├── tk86t.dll │ ├── unicodedata.pyd │ └── winsound.pyd ├── search-file-1.2.3.tar.gz ├── simple-database-1.0.1.tar.gz ├── turtlestar-1.0.4.tar.gz ├── ulang2-0.2.2.4.tar.gz ├── unpy2exe.py └── 文件修改日期 │ ├── _ctypes.pyd │ ├── _tkinter.pyd │ ├── library.zip │ ├── python37.dll │ ├── tcl86t.dll │ ├── tk86t.dll │ └── 文件修改日期gui.exe ├── event ├── __init__.py ├── examples │ ├── __init__.py │ ├── mouseController.py │ └── 录制键鼠事件.py ├── key.py └── mouse.py ├── opengl ├── 3d_test.py ├── README.txt ├── cube.py ├── cube_pyglet.py ├── heart_pyglet.py └── space.py ├── pygame ├── README.txt ├── beach_ball.png ├── 现代艺术.py ├── 球.py └── 粒子测试.py ├── pyshell.py ├── pyshell_w.pyw ├── run_pylint.bat ├── search_file.py ├── timer_tool.py ├── tk_dragtool.py ├── ulang ├── __init__.py ├── __main__.py ├── codegen │ ├── __init__.py │ ├── blockly.py │ ├── python.py │ └── ulgen.py ├── parser │ ├── __init__.py │ ├── core (备用 reserved).pyc │ ├── core.py │ ├── error.py │ ├── lexer.py │ ├── lrparser.py │ └── parsergenerator.py ├── runtime │ ├── __init__.py │ ├── env.py │ ├── main.py │ └── repl.py ├── ulang (pyc文件) │ ├── __init__.pyc │ ├── __main__.py │ ├── codegen │ │ ├── __init__.pyc │ │ ├── blockly.pyc │ │ ├── python.pyc │ │ └── ulgen.pyc │ ├── parser │ │ ├── __init__.pyc │ │ ├── core.pyc │ │ ├── error.pyc │ │ ├── lexer.pyc │ │ ├── lrparser.pyc │ │ └── parsergenerator.pyc │ └── runtime │ │ ├── __init__.pyc │ │ ├── env.pyc │ │ ├── main.pyc │ │ └── repl.pyc ├── 补丁.json └── 补丁使用说明.txt ├── 命令行 ├── README.txt ├── compile.py ├── console_tool.py ├── curses_editor.py ├── database.py ├── readbinfile.py ├── readfile.py ├── smile.py ├── snake.py ├── uncompile.py ├── 执行系统命令.py ├── 数码科技.py └── 音乐.wav ├── 图标 ├── BlackHole.jpg ├── PyNotepad.ico ├── binary.ico ├── build_passing.png ├── console.ico ├── life.ico ├── paint.ico ├── pickle.ico ├── pythonw.ico ├── snake.ico ├── terminal.ico ├── terminal2.ico ├── test_coverage.png ├── test_coverage.svg ├── turtle.ico ├── 写.ico ├── 加密.ico ├── 太阳系.ico ├── 微笑.ico ├── 微笑2.ico ├── 房子.ico ├── 数字.ico ├── 文件.ICO ├── 棋子.ico ├── 浏览器.ico ├── 猜.ico ├── 窗口.ico ├── 铃.ico ├── 音乐.ICO └── 香蕉.ico ├── 小项目 ├── AI │ ├── LTP语法分析.py │ ├── Q-Learning.py │ ├── README.txt │ ├── StanfordNLP.py │ ├── chatbot.py │ ├── codebert.py │ ├── convolution.py │ ├── data │ │ ├── digits.h5 │ │ ├── judge_lang.pkl │ │ ├── judge_lang_raw.pkl │ │ ├── judge_lang_tiny.pkl │ │ └── judge_lang_tune.pkl │ ├── gpt_2.py │ ├── judge_lang.py │ ├── transformer.py │ ├── 感知器.py │ ├── 数字识别.py │ └── 线性回归.py ├── README.txt ├── tkinter │ ├── Windows 搜索框模拟.py │ ├── pickle文件编辑器.py │ ├── tk透明效果.pyw │ ├── 浏览器.py │ └── 猜数游戏.py ├── turtle │ ├── README.txt │ ├── button.py │ ├── catch_turtle │ │ ├── README.txt │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── button.py │ │ ├── catch_turtle.py │ │ ├── cfg.cfg │ │ ├── turtles.py │ │ └── 图片 │ │ │ ├── 草地.gif │ │ │ └── 草地2.gif │ ├── demo.py │ ├── house.py │ ├── shapes │ │ ├── ellipse.py │ │ ├── house.py │ │ ├── pdf.py │ │ ├── 多边形.txt │ │ ├── 按角度画图.py │ │ ├── 画多边形.py │ │ ├── 画多边形_old.py │ │ ├── 绘制星形1.py │ │ └── 绘制星形2.py │ ├── timer.py │ ├── turtledemo.py │ ├── turtles.py │ ├── 下雨.py │ ├── 图片 │ │ ├── 岩壁.gif │ │ ├── 草地.gif │ │ ├── 草地2.gif │ │ └── 雨天.gif │ ├── 拖曳.py │ ├── 星空.py │ ├── 洞中流水.py │ ├── 画圆.py │ ├── 盾牌.py │ ├── 网格.py │ └── 网格2.py ├── 其他 │ ├── clock.py │ ├── 字符编码.py │ ├── 字符编码写测试.py │ ├── 字符解码.py │ ├── 无限输出.py │ ├── 无限输出2.py │ ├── 解压zip文件.py │ ├── 计算数字位数.py │ ├── 计算质数.py │ └── 输出三角形.py ├── 图像处理 │ ├── pil旋转.py │ ├── pil旋转特效.py │ ├── 二维码生成.py │ ├── 图像字符画.py │ ├── 图像无损放大.py │ └── 旋转特效.jpg ├── 性能 │ ├── GIL测试.py │ ├── GIL测试2.py │ ├── cpu使用率.py │ ├── crash.py │ ├── crash.pyc │ ├── 测试文件系统.py │ ├── 申请内存测试.py │ ├── 申请内存测试2.py │ ├── 运行自身.py │ └── 进程监视 │ │ ├── console_pauser.py │ │ └── 进程监视.py ├── 文件处理 │ ├── exe校验和验证.py │ ├── 复制文件工具.pyw │ ├── 复制文件工具2.pyw │ ├── 恢复chk文件中的docx, pptx文档.py │ ├── 扫描文件.pyw │ ├── 批量更改文件修改日期.py │ ├── 文件base64解码.py │ ├── 文件修改日期.py │ ├── 文件修改日期gui.py │ ├── 文件截断.py │ ├── 查找重复文件.py │ ├── 查找重复文件_同一目录.py │ ├── 清理cef程序缓存.py │ ├── 清理空文件夹.py │ └── 目录树比对.py ├── 注册表 │ ├── .gitignore │ ├── console_pauser.py │ └── reg.py ├── 算法 │ ├── crash.py │ ├── nim.py │ ├── 二分法(数学).py │ ├── 信息熵.py │ ├── 冒泡排序找出名次.py │ ├── 大整数求和.py │ ├── 字符串最长回文.py │ ├── 扩散.pyw │ ├── 数值模拟 │ │ ├── 欧拉法.py │ │ ├── 欧拉法_自由落体.py │ │ ├── 龙格库塔法.py │ │ ├── 龙格库塔法_自由落体.py │ │ ├── 龙格库塔法_自适应步长.py │ │ └── 龙格库塔法_黑洞.py │ ├── 数据加密.py │ ├── 数据压缩.py │ ├── 生成随机数.py │ ├── 生成随机数2.py │ ├── 简易正则表达式匹配.py │ └── 迭代计算.py ├── 面向对象 │ ├── msgbox.py │ ├── textbox.py │ ├── 对象引用.py │ ├── 对象引用2.py │ ├── 对象引用3.py │ └── 计算对象占用字节.py └── 音频 │ ├── README.txt │ ├── System.Speech.dll │ ├── music.py │ ├── music.pyw │ ├── 生成声波1.py │ ├── 生成声波2.py │ └── 调用Windows内置语音合成.py ├── 录屏.py ├── 录屏_gif.py ├── 录屏_png图片.py ├── 更新文件工具.py ├── 窗口控制工具.py ├── 编译pyd文件.py └── 键鼠事件.py /.gitignore: -------------------------------------------------------------------------------- 1 | *__pycache__* 2 | *.lnk 3 | # 兼容 更新文件工具.py 4 | *.git/* 5 | *.idea/* 6 | *.vs/* 7 | *.vscode/* 8 | *小项目/AI/LTP/* 9 | *小项目/AI/microsoft/* 10 | *小项目/AI/models/* 11 | *小项目/AI/stanza_resources/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 qfcy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PDF转Word.py: -------------------------------------------------------------------------------- 1 | from pdf2docx import Converter 2 | from os.path import normpath 3 | import os,traceback 4 | try: 5 | exec('import pip._vendor.colorama as colorama') # exec:避免增大pyinstaller文件体积 6 | colorama.init() # 支持彩色文字显示 7 | except ImportError:pass 8 | 9 | pdf_file = normpath(input('源pdf文件: ')).strip('"').strip() 10 | default=pdf_file.lower().replace('.pdf','_转换.docx') 11 | docx_file = \ 12 | normpath(input('目标docx文件 ( 默认 %s): '%default) or default 13 | ).strip('"').strip()\ 14 | 15 | # convert pdf to docx 16 | cv = Converter(pdf_file) 17 | try: 18 | cv.convert(docx_file, start=0, end=None) 19 | cv.close() 20 | print("转换成功:",pdf_file) 21 | except Exception: 22 | traceback.print_exc() 23 | 24 | os.system("pause") 25 | -------------------------------------------------------------------------------- /WEB/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者使用Python开发的网络项目, 包含爬虫、服务器程序等。 -------------------------------------------------------------------------------- /WEB/http服务器.py: -------------------------------------------------------------------------------- 1 | import socket,os,time 2 | from concurrent.futures import ThreadPoolExecutor 3 | 4 | def handle_client(client_socket): 5 | # 处理客户端请求 6 | request_data = client_socket.recv(1024) 7 | print("请求数据:", request_data.decode()) 8 | # 构造响应数据 9 | response_start_line = "HTTP/1.1 200 OK\r\n" 10 | response_headers = "Server: PyServer\r\n" 11 | response_body = """ 12 | 13 | 14 |

Python HTTP Test

""" 15 | if b"Trident" in request_data: # 识别浏览器类型 16 | response_body += "

IE 浏览器

" 17 | response_body += "" 18 | response = response_start_line + response_headers + "\r\n" + response_body 19 | 20 | # 向客户端返回响应数据 21 | client_socket.send(bytes(response, "utf-8")) 22 | 23 | # 关闭客户端连接 24 | client_socket.close() 25 | 26 | 27 | if __name__ == "__main__": 28 | server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 29 | server_socket.bind(("", 8000)) 30 | server_socket.listen(128) 31 | import webbrowser 32 | webbrowser.open('http://127.0.0.1:8000/') 33 | # 多线程 34 | with ThreadPoolExecutor(max_workers=os.cpu_count()) as executor: 35 | while True: 36 | client_socket, client_address = server_socket.accept() 37 | print("[%s, %s]用户连接上了" % client_address) 38 | executor.submit(handle_client, client_socket) 39 | client_socket.close() -------------------------------------------------------------------------------- /WEB/netcat.py: -------------------------------------------------------------------------------- 1 | # 类似netcat命令行的工具(备用) 2 | import sys,socket,ast,time 3 | 4 | def main(): 5 | if len(sys.argv) != 3: 6 | print(f"用法: python {sys.argv[0]} host port") 7 | return 8 | 9 | host = sys.argv[1] 10 | port = int(sys.argv[2]) 11 | 12 | try: 13 | sock = socket.create_connection((host, port)) 14 | sock.setblocking(False) 15 | print(f"已连接到 {host}:{port}") 16 | except Exception as e: 17 | print(f"连接失败: {e}") 18 | return 19 | 20 | try: 21 | while True: 22 | # 接收数据 23 | while True: 24 | try: 25 | data = sock.recv(4096) 26 | break 27 | except BlockingIOError: 28 | print(".",end="",flush=True) 29 | time.sleep(0.5) 30 | except Exception as err: 31 | print(f"{type(err).__name__}: {err}") 32 | break 33 | # 显示 bytes 的转义字符串 34 | print("收到:", repr(data)) 35 | 36 | # 用户输入处理,例如输入 b'abc\x01' 37 | s = input("输入要发送的数据(如 b'\\x01'):").strip() 38 | if not s: 39 | continue 40 | try: 41 | to_send = ast.literal_eval(s) 42 | sock.sendall(to_send) 43 | except Exception as err: 44 | print(f"{type(err).__name__}: {err}") 45 | finally: 46 | sock.close() 47 | 48 | if __name__ == "__main__": 49 | main() -------------------------------------------------------------------------------- /WEB/tcp客户端.py: -------------------------------------------------------------------------------- 1 | # 改编自其他项目 2 | import socket,traceback 3 | 4 | CODING="utf-8" 5 | # 设置IP和端口号 6 | default_ip = "127.0.0.1" #socket.gethostbyname(socket.gethostname()) 7 | default_port=80 8 | ip=input("输入IP地址 (默认 %s): "%default_ip).strip() or default_ip 9 | port=int(input("输入端口号 (默认 %d): "%default_port).strip() or default_port) 10 | 11 | addr = (ip, port) 12 | 13 | # 创建套接字 14 | sock = socket.socket() 15 | 16 | # 连接服务器 17 | sock.connect(addr) 18 | print('已连接服务器 %s。'%str(addr)) 19 | 20 | try: 21 | while True: 22 | # 发送数据 23 | data = input('发送数据:') 24 | try: 25 | sock.send(data.encode(CODING)) 26 | # 接收数据 27 | recv = sock.recv(16384) 28 | except ConnectionError as err: 29 | print("重新连接服务器 (%s): %s" % (type(err).__name__,str(err))) 30 | sock.close();sock = socket.socket() 31 | sock.connect(addr) 32 | sock.send(data.encode(CODING)) 33 | recv = sock.recv(16384) 34 | print('接收数据:',recv.decode(CODING)) 35 | 36 | except BaseException: 37 | traceback.print_exc() 38 | 39 | # 关闭套接字 40 | sock.close() 41 | print('断开服务器。') -------------------------------------------------------------------------------- /WEB/tcp服务器.py: -------------------------------------------------------------------------------- 1 | # 本文件改编自其他项目 2 | import socket 3 | 4 | CODING="utf-8" 5 | # 创建套接字 6 | sock = socket.socket() 7 | 8 | # 设置IP和端口号 9 | ip = "127.0.0.1" #socket.gethostbyname(socket.gethostname()) 10 | server_addr = (ip,8000) 11 | 12 | # 绑定IP和端口号 13 | sock.bind(server_addr) 14 | 15 | # 打开监听 16 | sock.listen(128) 17 | print('在%s打开监听,等待客户端连接。'%str(server_addr)) 18 | 19 | # 等待客户端连接 20 | client_sock, address = sock.accept() 21 | print('客户端已连接:',address) 22 | 23 | while True: 24 | # 接收数据 25 | recv = client_sock.recv(1024) 26 | print('接收客户端数据:',recv.decode(CODING)) 27 | 28 | # 发送数据 29 | data = input('发送客户端数据:') 30 | client_sock.send(data.encode(CODING)) 31 | 32 | # 关闭套接字 33 | client_sock.close() 34 | sock.close() 35 | print('关闭服务器。') -------------------------------------------------------------------------------- /WEB/udp客户端.py: -------------------------------------------------------------------------------- 1 | import socket 2 | 3 | # 创建UDP客户端 4 | client_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 5 | server_address = ('localhost', 8001) 6 | 7 | try: 8 | while True: 9 | # 发送数据 10 | data = input('发送数据:') 11 | client_socket.sendto(data.encode(), server_address) # 发送数据 12 | finally: 13 | client_socket.close() # 关闭客户端 -------------------------------------------------------------------------------- /WEB/udp服务器.py: -------------------------------------------------------------------------------- 1 | import socket 2 | 3 | # 创建UDP服务器 4 | address = ('127.0.0.1', 8001) 5 | server_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 6 | server_socket.bind(address) # 绑定IP和端口 7 | 8 | print("服务器正在于%s运行,等待接收消息..."%str(address)) 9 | while True: 10 | data, addr = server_socket.recvfrom(1024) # 接收数据报 11 | print(f"接收到来自{addr}的消息: {data.decode()}") -------------------------------------------------------------------------------- /WEB/爬取csdn文章.py: -------------------------------------------------------------------------------- 1 | from requests import get 2 | import re 3 | 4 | headers = { 5 | "User-Agent": """Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 \ 6 | (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36""" 7 | } 8 | 9 | url = input('输入文章网址: ') 10 | req = get(url,headers=headers) 11 | text=req.content.decode('utf-8') 12 | patt=re.compile('',re.S) 13 | #css_patt=re.compile('(.*?)',text,re.S)[0] 16 | content='''\ 17 | %s'''%title 18 | #for css in re.findall(css_patt,text): 19 | # content+=css+'>' 20 | 21 | content += re.findall(patt,text)[0] 22 | content += '' 23 | 24 | # 去除文件名不能包含的特殊字符 25 | tbl = str.maketrans('','','\\/:*?"<>|') 26 | filename = '%s.html'%title.translate(tbl) 27 | with open(filename,'w',encoding='utf-8') as f: 28 | f.write(content) 29 | -------------------------------------------------------------------------------- /WEB/爬取博客园文章.py: -------------------------------------------------------------------------------- 1 | from requests import get 2 | from lxml.etree import HTML, tostring 3 | import re 4 | 5 | headers = { 6 | "User-Agent": """Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 \ 7 | (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36""" 8 | } 9 | 10 | url = input('输入文章网址: ') 11 | req = get(url,headers=headers) 12 | text=req.content.decode('utf-8') 13 | 14 | title = re.findall('(.*?)',text,re.S)[0] 15 | tree = HTML(text) 16 | div = tree.xpath('//*[@id="cnblogs_post_body"]')[0] 17 | 18 | content='%s'%title # 要保存的网页内容 19 | for result in re.findall('(' 23 | else: 24 | css = result[0] + '>' 25 | content += css 26 | 27 | content += tostring(div, method='html').decode('utf-8') 28 | content += '' 29 | with open('%s.html'%title,'w',encoding='utf-8') as f: 30 | f.write(content) 31 | -------------------------------------------------------------------------------- /WEB/爬取问题.py: -------------------------------------------------------------------------------- 1 | from requests import get 2 | from lxml.etree import HTML, tostring 3 | import time 4 | 5 | def update(print_new = True): 6 | global lst,lst_new 7 | headers = { 8 | "User-Agent": """Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 \ 9 | (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36""" 10 | } 11 | 12 | url = "https://ask.csdn.net/ask" 13 | req = get(url,headers=headers) 14 | text=req.content.decode('utf-8') 15 | 16 | tree = HTML(text) 17 | ques = tree.xpath('//*[@id="floor-ask-content-index_493"]/div/div/div[2]/div/div/div[1]/a/h2') 18 | lst_new=[] 19 | for q in ques: 20 | lst_new.append(q.text) 21 | if q.text not in lst and print_new: 22 | print("新问题: ",q.text) 23 | 24 | lst = lst_new.copy() 25 | 26 | lst=[] 27 | lst_new=[] 28 | update(print_new = False) # 首次运行更新列表 29 | time.sleep(5) 30 | while True: 31 | update() 32 | time.sleep(8) -------------------------------------------------------------------------------- /WEB/百度翻译_api.py: -------------------------------------------------------------------------------- 1 | # 代码来自网络 2 | import http.client 3 | import hashlib 4 | import json 5 | import urllib 6 | import random 7 | import traceback 8 | 9 | def baidu_translate(content): 10 | appid = '20151113000005349' 11 | secretKey = 'osubCEzlGjzvw8qdQc41' 12 | httpClient = None 13 | myurl = '/api/trans/vip/translate' 14 | q = content 15 | fromLang = 'en' # 源语言 16 | toLang = 'zh' # 翻译后的语言 17 | salt = random.randint(32768, 65536) 18 | sign = appid + q + str(salt) + secretKey 19 | sign = hashlib.md5(sign.encode()).hexdigest() 20 | myurl = myurl + '?appid=' + appid + '&q=' + urllib.parse.quote( 21 | q) + '&from=' + fromLang + '&to=' + toLang + '&salt=' + str( 22 | salt) + '&sign=' + sign 23 | 24 | try: 25 | httpClient = http.client.HTTPConnection('api.fanyi.baidu.com') 26 | httpClient.request('GET', myurl) 27 | # response是HTTPResponse对象 28 | response = httpClient.getresponse() 29 | jsonResponse = response.read().decode("utf-8")# 获得返回的结果,结果为json格式 30 | js = json.loads(jsonResponse) # 将json格式的结果转换字典结构 31 | if js.get("error_msg",None): 32 | raise Exception(str(js["error_code"])+js["error_msg"]) 33 | dst = str(js["trans_result"][0]["dst"]) # 取得翻译后的文本结果 34 | return dst 35 | except Exception: 36 | traceback.print_exc() 37 | finally: 38 | if httpClient: 39 | httpClient.close() 40 | 41 | while True: 42 | text=input("输入英文:") 43 | if text: 44 | print(baidu_translate(text) or '') 45 | -------------------------------------------------------------------------------- /dist/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者的程序打包成的exe文件, 和作者上传至PyPI的Python项目, 以及相关的工具。 -------------------------------------------------------------------------------- /dist/catch_turtle-1.1.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/catch_turtle-1.1.4.tar.gz -------------------------------------------------------------------------------- /dist/check_&_upload.bat: -------------------------------------------------------------------------------- 1 | python -m twine check %* 2 | pause 3 | python -m twine upload %* 4 | pause -------------------------------------------------------------------------------- /dist/console-tool-1.2.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/console-tool-1.2.4.tar.gz -------------------------------------------------------------------------------- /dist/event-simulate-1.1.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/event-simulate-1.1.2.tar.gz -------------------------------------------------------------------------------- /dist/freegames-extended-2.3.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/freegames-extended-2.3.4.tar.gz -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/ascii.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: ascii, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E0000 13 | 0000000000000000000000000000000000000000000000000000000000000000 14 | 0000000000000000000000000000000000000000000000000000000000000000 15 | 0000000000000000000000000000000000000000000000000000000000000000 16 | 0000000000000000000000000000000000000000000000000000000000000000 17 | 0000000000000000000000000000000000000000000000000000000000000000 18 | 0000000000000000000000000000000000000000000000000000000000000000 19 | 0000000000000000000000000000000000000000000000000000000000000000 20 | 0000000000000000000000000000000000000000000000000000000000000000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1250.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1250, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0083201E2026202020210088203001602039015A0164017D0179 14 | 009020182019201C201D202220132014009821220161203A015B0165017E017A 15 | 00A002C702D8014100A4010400A600A700A800A9015E00AB00AC00AD00AE017B 16 | 00B000B102DB014200B400B500B600B700B80105015F00BB013D02DD013E017C 17 | 015400C100C2010200C40139010600C7010C00C9011800CB011A00CD00CE010E 18 | 01100143014700D300D4015000D600D70158016E00DA017000DC00DD016200DF 19 | 015500E100E2010300E4013A010700E7010D00E9011900EB011B00ED00EE010F 20 | 01110144014800F300F4015100F600F70159016F00FA017100FC00FD016302D9 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1251.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1251, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 04020403201A0453201E20262020202120AC203004092039040A040C040B040F 14 | 045220182019201C201D202220132014009821220459203A045A045C045B045F 15 | 00A0040E045E040800A4049000A600A7040100A9040400AB00AC00AD00AE0407 16 | 00B000B104060456049100B500B600B704512116045400BB0458040504550457 17 | 0410041104120413041404150416041704180419041A041B041C041D041E041F 18 | 0420042104220423042404250426042704280429042A042B042C042D042E042F 19 | 0430043104320433043404350436043704380439043A043B043C043D043E043F 20 | 0440044104420443044404450446044704480449044A044B044C044D044E044F 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1252.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1252, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0192201E20262020202102C62030016020390152008D017D008F 14 | 009020182019201C201D20222013201402DC21220161203A0153009D017E0178 15 | 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1253.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1253, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0192201E20262020202100882030008A2039008C008D008E008F 14 | 009020182019201C201D20222013201400982122009A203A009C009D009E009F 15 | 00A00385038600A300A400A500A600A700A800A9000000AB00AC00AD00AE2015 16 | 00B000B100B200B3038400B500B600B703880389038A00BB038C00BD038E038F 17 | 0390039103920393039403950396039703980399039A039B039C039D039E039F 18 | 03A003A1000003A303A403A503A603A703A803A903AA03AB03AC03AD03AE03AF 19 | 03B003B103B203B303B403B503B603B703B803B903BA03BB03BC03BD03BE03BF 20 | 03C003C103C203C303C403C503C603C703C803C903CA03CB03CC03CD03CE0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1254.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1254, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0192201E20262020202102C62030016020390152008D008E008F 14 | 009020182019201C201D20222013201402DC21220161203A0153009D009E0178 15 | 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 011E00D100D200D300D400D500D600D700D800D900DA00DB00DC0130015E00DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 011F00F100F200F300F400F500F600F700F800F900FA00FB00FC0131015F00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1255.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1255, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0192201E20262020202102C62030008A2039008C008D008E008F 14 | 009020182019201C201D20222013201402DC2122009A203A009C009D009E009F 15 | 00A000A100A200A320AA00A500A600A700A800A900D700AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900F700BB00BC00BD00BE00BF 17 | 05B005B105B205B305B405B505B605B705B805B9000005BB05BC05BD05BE05BF 18 | 05C005C105C205C305F005F105F205F305F40000000000000000000000000000 19 | 05D005D105D205D305D405D505D605D705D805D905DA05DB05DC05DD05DE05DF 20 | 05E005E105E205E305E405E505E605E705E805E905EA00000000200E200F0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1256.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1256, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC067E201A0192201E20262020202102C62030067920390152068606980688 14 | 06AF20182019201C201D20222013201406A921220691203A0153200C200D06BA 15 | 00A0060C00A200A300A400A500A600A700A800A906BE00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B9061B00BB00BC00BD00BE061F 17 | 06C1062106220623062406250626062706280629062A062B062C062D062E062F 18 | 063006310632063306340635063600D7063706380639063A0640064106420643 19 | 00E0064400E2064506460647064800E700E800E900EA00EB0649064A00EE00EF 20 | 064B064C064D064E00F4064F065000F7065100F9065200FB00FC200E200F06D2 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1257.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1257, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0083201E20262020202100882030008A2039008C00A802C700B8 14 | 009020182019201C201D20222013201400982122009A203A009C00AF02DB009F 15 | 00A0000000A200A300A4000000A600A700D800A9015600AB00AC00AD00AE00C6 16 | 00B000B100B200B300B400B500B600B700F800B9015700BB00BC00BD00BE00E6 17 | 0104012E0100010600C400C501180112010C00C90179011601220136012A013B 18 | 01600143014500D3014C00D500D600D701720141015A016A00DC017B017D00DF 19 | 0105012F0101010700E400E501190113010D00E9017A011701230137012B013C 20 | 01610144014600F3014D00F500F600F701730142015B016B00FC017C017E02D9 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp1258.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp1258, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC0081201A0192201E20262020202102C62030008A20390152008D008E008F 14 | 009020182019201C201D20222013201402DC2122009A203A0153009D009E0178 15 | 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF 17 | 00C000C100C2010200C400C500C600C700C800C900CA00CB030000CD00CE00CF 18 | 011000D1030900D300D401A000D600D700D800D900DA00DB00DC01AF030300DF 19 | 00E000E100E2010300E400E500E600E700E800E900EA00EB030100ED00EE00EF 20 | 011100F1032300F300F401A100F600F700F800F900FA00FB00FC01B020AB00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp437.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp437, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5 14 | 00C900E600C600F400F600F200FB00F900FF00D600DC00A200A300A520A70192 15 | 00E100ED00F300FA00F100D100AA00BA00BF231000AC00BD00BC00A100AB00BB 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp737.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp737, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 039103920393039403950396039703980399039A039B039C039D039E039F03A0 14 | 03A103A303A403A503A603A703A803A903B103B203B303B403B503B603B703B8 15 | 03B903BA03BB03BC03BD03BE03BF03C003C103C303C203C403C503C603C703C8 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03C903AC03AD03AE03CA03AF03CC03CD03CB03CE038603880389038A038C038E 20 | 038F00B12265226403AA03AB00F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp775.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp775, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 010600FC00E9010100E4012300E501070142011301560157012B017900C400C5 14 | 00C900E600C6014D00F6012200A2015A015B00D600DC00F800A300D800D700A4 15 | 0100012A00F3017B017C017A201D00A600A900AE00AC00BD00BC014100AB00BB 16 | 259125922593250225240104010C01180116256325512557255D012E01602510 17 | 25142534252C251C2500253C0172016A255A25542569256625602550256C017D 18 | 0105010D01190117012F01610173016B017E2518250C25882584258C25902580 19 | 00D300DF014C014300F500D500B5014401360137013B013C0146011201452019 20 | 00AD00B1201C00BE00B600A700F7201E00B0221900B700B900B300B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp850.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp850, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5 14 | 00C900E600C600F400F600F200FB00F900FF00D600DC00F800A300D800D70192 15 | 00E100ED00F300FA00F100D100AA00BA00BF00AE00AC00BD00BC00A100AB00BB 16 | 2591259225932502252400C100C200C000A9256325512557255D00A200A52510 17 | 25142534252C251C2500253C00E300C3255A25542569256625602550256C00A4 18 | 00F000D000CA00CB00C8013100CD00CE00CF2518250C2588258400A600CC2580 19 | 00D300DF00D400D200F500D500B500FE00DE00DA00DB00D900FD00DD00AF00B4 20 | 00AD00B1201700BE00B600A700F700B800B000A800B700B900B300B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp852.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp852, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E4016F010700E7014200EB0150015100EE017900C40106 14 | 00C90139013A00F400F6013D013E015A015B00D600DC01640165014100D7010D 15 | 00E100ED00F300FA01040105017D017E0118011900AC017A010C015F00AB00BB 16 | 2591259225932502252400C100C2011A015E256325512557255D017B017C2510 17 | 25142534252C251C2500253C01020103255A25542569256625602550256C00A4 18 | 01110110010E00CB010F014700CD00CE011B2518250C258825840162016E2580 19 | 00D300DF00D401430144014801600161015400DA0155017000FD00DD016300B4 20 | 00AD02DD02DB02C702D800A700F700B800B000A802D901710158015925A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp855.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp855, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0452040204530403045104010454040404550405045604060457040704580408 14 | 04590409045A040A045B040B045C040C045E040E045F040F044E042E044A042A 15 | 0430041004310411044604260434041404350415044404240433041300AB00BB 16 | 259125922593250225240445042504380418256325512557255D043904192510 17 | 25142534252C251C2500253C043A041A255A25542569256625602550256C00A4 18 | 043B041B043C041C043D041D043E041E043F2518250C25882584041F044F2580 19 | 042F044004200441042104420422044304230436041604320412044C042C2116 20 | 00AD044B042B0437041704480428044D042D044904290447042700A725A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp857.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp857, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE013100C400C5 14 | 00C900E600C600F400F600F200FB00F9013000D600DC00F800A300D8015E015F 15 | 00E100ED00F300FA00F100D1011E011F00BF00AE00AC00BD00BC00A100AB00BB 16 | 2591259225932502252400C100C200C000A9256325512557255D00A200A52510 17 | 25142534252C251C2500253C00E300C3255A25542569256625602550256C00A4 18 | 00BA00AA00CA00CB00C8000000CD00CE00CF2518250C2588258400A600CC2580 19 | 00D300DF00D400D200F500D500B5000000D700DA00DB00D900EC00FF00AF00B4 20 | 00AD00B1000000BE00B600A700F700B800B000A800B700B900B300B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp860.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp860, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E300E000C100E700EA00CA00E800CD00D400EC00C300C2 14 | 00C900C000C800F400F500F200DA00F900CC00D500DC00A200A300D920A700D3 15 | 00E100ED00F300FA00F100D100AA00BA00BF00D200AC00BD00BC00A100AB00BB 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp861.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp861, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E400E000E500E700EA00EB00E800D000F000DE00C400C5 14 | 00C900E600C600F400F600FE00FB00DD00FD00D600DC00F800A300D820A70192 15 | 00E100ED00F300FA00C100CD00D300DA00BF231000AC00BD00BC00A100AB00BB 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp862.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp862, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 05D005D105D205D305D405D505D605D705D805D905DA05DB05DC05DD05DE05DF 14 | 05E005E105E205E305E405E505E605E705E805E905EA00A200A300A520A70192 15 | 00E100ED00F300FA00F100D100AA00BA00BF231000AC00BD00BC00A100AB00BB 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp863.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp863, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200C200E000B600E700EA00EB00E800EF00EE201700C000A7 14 | 00C900C800CA00F400CB00CF00FB00F900A400D400DC00A200A300D900DB0192 15 | 00A600B400F300FA00A800B800B300AF00CE231000AC00BD00BC00BE00AB00BB 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp864.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp864, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 00200021002200230024066A0026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00B000B72219221A259225002502253C2524252C251C25342510250C25142518 14 | 03B2221E03C600B100BD00BC224800AB00BBFEF7FEF8009B009CFEFBFEFC009F 15 | 00A000ADFE8200A300A4FE8400000000FE8EFE8FFE95FE99060CFE9DFEA1FEA5 16 | 0660066106620663066406650666066706680669FED1061BFEB1FEB5FEB9061F 17 | 00A2FE80FE81FE83FE85FECAFE8BFE8DFE91FE93FE97FE9BFE9FFEA3FEA7FEA9 18 | FEABFEADFEAFFEB3FEB7FEBBFEBFFEC1FEC5FECBFECF00A600AC00F700D7FEC9 19 | 0640FED3FED7FEDBFEDFFEE3FEE7FEEBFEEDFEEFFEF3FEBDFECCFECEFECDFEE1 20 | FE7D0651FEE5FEE9FEECFEF0FEF2FED0FED5FEF5FEF6FEDDFED9FEF125A00000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp865.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp865, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C700FC00E900E200E400E000E500E700EA00EB00E800EF00EE00EC00C400C5 14 | 00C900E600C600F400F600F200FB00F900FF00D600DC00F800A300D820A70192 15 | 00E100ED00F300FA00F100D100AA00BA00BF231000AC00BD00BC00A100AB00A4 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 03B100DF039303C003A303C300B503C403A6039803A903B4221E03C603B52229 20 | 226100B1226522642320232100F7224800B0221900B7221A207F00B225A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp866.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp866, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0410041104120413041404150416041704180419041A041B041C041D041E041F 14 | 0420042104220423042404250426042704280429042A042B042C042D042E042F 15 | 0430043104320433043404350436043704380439043A043B043C043D043E043F 16 | 259125922593250225242561256225562555256325512557255D255C255B2510 17 | 25142534252C251C2500253C255E255F255A25542569256625602550256C2567 18 | 2568256425652559255825522553256B256A2518250C25882584258C25902580 19 | 0440044104420443044404450446044704480449044A044B044C044D044E044F 20 | 040104510404045404070457040E045E00B0221900B7221A211600A425A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp869.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp869, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850386008700B700AC00A620182019038820150389 14 | 038A03AA038C00930094038E03AB00A9038F00B200B303AC00A303AD03AE03AF 15 | 03CA039003CC03CD039103920393039403950396039700BD0398039900AB00BB 16 | 25912592259325022524039A039B039C039D256325512557255D039E039F2510 17 | 25142534252C251C2500253C03A003A1255A25542569256625602550256C03A3 18 | 03A403A503A603A703A803A903B103B203B32518250C2588258403B403B52580 19 | 03B603B703B803B903BA03BB03BC03BD03BE03BF03C003C103C303C203C40384 20 | 00AD00B103C503C603C700A703C8038500B000A803C903CB03B003CE25A000A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/cp874.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: cp874, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 20AC008100820083008420260086008700880089008A008B008C008D008E008F 14 | 009020182019201C201D20222013201400980099009A009B009C009D009E009F 15 | 00A00E010E020E030E040E050E060E070E080E090E0A0E0B0E0C0E0D0E0E0E0F 16 | 0E100E110E120E130E140E150E160E170E180E190E1A0E1B0E1C0E1D0E1E0E1F 17 | 0E200E210E220E230E240E250E260E270E280E290E2A0E2B0E2C0E2D0E2E0E2F 18 | 0E300E310E320E330E340E350E360E370E380E390E3A00000000000000000E3F 19 | 0E400E410E420E430E440E450E460E470E480E490E4A0E4B0E4C0E4D0E4E0E4F 20 | 0E500E510E520E530E540E550E560E570E580E590E5A0E5B0000000000000000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/dingbats.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: dingbats, single-byte 2 | S 3 | 003F 1 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 00202701270227032704260E2706270727082709261B261E270C270D270E270F 8 | 2710271127122713271427152716271727182719271A271B271C271D271E271F 9 | 2720272127222723272427252726272726052729272A272B272C272D272E272F 10 | 2730273127322733273427352736273727382739273A273B273C273D273E273F 11 | 2740274127422743274427452746274727482749274A274B25CF274D25A0274F 12 | 27502751275225B225BC25C6275625D727582759275A275B275C275D275E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 0000276127622763276427652766276726632666266526602460246124622463 16 | 2464246524662467246824692776277727782779277A277B277C277D277E277F 17 | 2780278127822783278427852786278727882789278A278B278C278D278E278F 18 | 2790279127922793279421922194219527982799279A279B279C279D279E279F 19 | 27A027A127A227A327A427A527A627A727A827A927AA27AB27AC27AD27AE27AF 20 | 000027B127B227B327B427B527B627B727B827B927BA27BB27BC27BD27BE0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/ebcdic.enc: -------------------------------------------------------------------------------- 1 | S 2 | 006F 0 1 3 | 00 4 | 0000000100020003008500090086007F0087008D008E000B000C000D000E000F 5 | 0010001100120013008F000A0008009700180019009C009D001C001D001E001F 6 | 0080008100820083008400920017001B00880089008A008B008C000500060007 7 | 0090009100160093009400950096000400980099009A009B00140015009E001A 8 | 002000A000E200E400E000E100E300E500E700F10060002E003C0028002B007C 9 | 002600E900EA00EB00E800ED00EE00EF00EC00DF00210024002A0029003B009F 10 | 002D002F00C200C400C000C100C300C500C700D1005E002C0025005F003E003F 11 | 00F800C900CA00CB00C800CD00CE00CF00CC00A8003A002300400027003D0022 12 | 00D800610062006300640065006600670068006900AB00BB00F000FD00FE00B1 13 | 00B0006A006B006C006D006E006F00700071007200AA00BA00E600B800C600A4 14 | 00B500AF0073007400750076007700780079007A00A100BF00D000DD00DE00AE 15 | 00A200A300A500B700A900A700B600BC00BD00BE00AC005B005C005D00B400D7 16 | 00F900410042004300440045004600470048004900AD00F400F600F200F300F5 17 | 00A6004A004B004C004D004E004F00500051005200B900FB00FC00DB00FA00FF 18 | 00D900F70053005400550056005700580059005A00B200D400D600D200D300D5 19 | 003000310032003300340035003600370038003900B3007B00DC007D00DA007E 20 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/gb1988.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: gb1988, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 002000210022002300A500250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D203E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 0000FF61FF62FF63FF64FF65FF66FF67FF68FF69FF6AFF6BFF6CFF6DFF6EFF6F 16 | FF70FF71FF72FF73FF74FF75FF76FF77FF78FF79FF7AFF7BFF7CFF7DFF7EFF7F 17 | FF80FF81FF82FF83FF84FF85FF86FF87FF88FF89FF8AFF8BFF8CFF8DFF8EFF8F 18 | FF90FF91FF92FF93FF94FF95FF96FF97FF98FF99FF9AFF9BFF9CFF9DFF9EFF9F 19 | 0000000000000000000000000000000000000000000000000000000000000000 20 | 0000000000000000000000000000000000000000000000000000000000000000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso2022-jp.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso2022-jp, escape-driven 2 | E 3 | name iso2022-jp 4 | init {} 5 | final {} 6 | ascii \x1b(B 7 | jis0201 \x1b(J 8 | jis0208 \x1b$B 9 | jis0208 \x1b$@ 10 | jis0212 \x1b$(D 11 | gb2312 \x1b$A 12 | ksc5601 \x1b$(C 13 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso2022-kr.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso2022-kr, escape-driven 2 | E 3 | name iso2022-kr 4 | init \x1b$)C 5 | final {} 6 | iso8859-1 \x0f 7 | ksc5601 \x0e 8 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso2022.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso2022, escape-driven 2 | E 3 | name iso2022 4 | init {} 5 | final {} 6 | iso8859-1 \x1b(B 7 | jis0201 \x1b(J 8 | gb1988 \x1b(T 9 | jis0208 \x1b$B 10 | jis0208 \x1b$@ 11 | jis0212 \x1b$(D 12 | gb2312 \x1b$A 13 | ksc5601 \x1b$(C 14 | jis0208 \x1b&@\x1b$B 15 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-1.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-1, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-10.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-10, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0010401120122012A0128013600A7013B011001600166017D00AD016A014A 16 | 00B0010501130123012B0129013700B7013C011101610167017E2015016B014B 17 | 010000C100C200C300C400C500C6012E010C00C9011800CB011600CD00CE00CF 18 | 00D00145014C00D300D400D500D6016800D8017200DA00DB00DC00DD00DE00DF 19 | 010100E100E200E300E400E500E6012F010D00E9011900EB011700ED00EE00EF 20 | 00F00146014D00F300F400F500F6016900F8017300FA00FB00FC00FD00FE0138 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-13.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-13, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0201D00A200A300A4201E00A600A700D800A9015600AB00AC00AD00AE00C6 16 | 00B000B100B200B3201C00B500B600B700F800B9015700BB00BC00BD00BE00E6 17 | 0104012E0100010600C400C501180112010C00C90179011601220136012A013B 18 | 01600143014500D3014C00D500D600D701720141015A016A00DC017B017D00DF 19 | 0105012F0101010700E400E501190113010D00E9017A011701230137012B013C 20 | 01610144014600F3014D00F500F600F701730142015B016B00FC017C017E2019 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-14.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-14, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A01E021E0300A3010A010B1E0A00A71E8000A91E821E0B1EF200AD00AE0178 16 | 1E1E1E1F012001211E401E4100B61E561E811E571E831E601EF31E841E851E61 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 017400D100D200D300D400D500D61E6A00D800D900DA00DB00DC00DD017600DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 017500F100F200F300F400F500F61E6B00F800F900FA00FB00FC00FD017700FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-15.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-15, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A000A100A200A320AC00A5016000A7016100A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B3017D00B500B600B7017E00B900BA00BB01520153017800BF 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 00D000D100D200D300D400D500D600D700D800D900DA00DB00DC00DD00DE00DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 00F000F100F200F300F400F500F600F700F800F900FA00FB00FC00FD00FE00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-16.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-16, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A001040105014120AC201E016000A7016100A9021800AB017900AD017A017B 16 | 00B000B1010C0142017D201D00B600B7017E010D021900BB015201530178017C 17 | 00C000C100C2010200C4010600C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 0110014300D200D300D4015000D6015A017000D900DA00DB00DC0118021A00DF 19 | 00E000E100E2010300E4010700E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 0111014400F200F300F4015100F6015B017100F900FA00FB00FC0119021B00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-2.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-2, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0010402D8014100A4013D015A00A700A80160015E0164017900AD017D017B 16 | 00B0010502DB014200B4013E015B02C700B80161015F0165017A02DD017E017C 17 | 015400C100C2010200C40139010600C7010C00C9011800CB011A00CD00CE010E 18 | 01100143014700D300D4015000D600D70158016E00DA017000DC00DD016200DF 19 | 015500E100E2010300E4013A010700E7010D00E9011900EB011B00ED00EE010F 20 | 01110144014800F300F4015100F600F70159016F00FA017100FC00FD016302D9 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-3.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-3, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0012602D800A300A40000012400A700A80130015E011E013400AD0000017B 16 | 00B0012700B200B300B400B5012500B700B80131015F011F013500BD0000017C 17 | 00C000C100C2000000C4010A010800C700C800C900CA00CB00CC00CD00CE00CF 18 | 000000D100D200D300D4012000D600D7011C00D900DA00DB00DC016C015C00DF 19 | 00E000E100E2000000E4010B010900E700E800E900EA00EB00EC00ED00EE00EF 20 | 000000F100F200F300F4012100F600F7011D00F900FA00FB00FC016D015D02D9 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-4.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-4, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A001040138015600A40128013B00A700A8016001120122016600AD017D00AF 16 | 00B0010502DB015700B40129013C02C700B80161011301230167014A017E014B 17 | 010000C100C200C300C400C500C6012E010C00C9011800CB011600CD00CE012A 18 | 01100145014C013600D400D500D600D700D8017200DA00DB00DC0168016A00DF 19 | 010100E100E200E300E400E500E6012F010D00E9011900EB011700ED00EE012B 20 | 01110146014D013700F400F500F600F700F8017300FA00FB00FC0169016B02D9 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-5.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-5, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0040104020403040404050406040704080409040A040B040C00AD040E040F 16 | 0410041104120413041404150416041704180419041A041B041C041D041E041F 17 | 0420042104220423042404250426042704280429042A042B042C042D042E042F 18 | 0430043104320433043404350436043704380439043A043B043C043D043E043F 19 | 0440044104420443044404450446044704480449044A044B044C044D044E044F 20 | 2116045104520453045404550456045704580459045A045B045C00A7045E045F 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-6.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-6, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A000000000000000A40000000000000000000000000000060C00AD00000000 16 | 00000000000000000000000000000000000000000000061B000000000000061F 17 | 0000062106220623062406250626062706280629062A062B062C062D062E062F 18 | 0630063106320633063406350636063706380639063A00000000000000000000 19 | 0640064106420643064406450646064706480649064A064B064C064D064E064F 20 | 0650065106520000000000000000000000000000000000000000000000000000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-7.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-7, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A02018201900A30000000000A600A700A800A9000000AB00AC00AD00002015 16 | 00B000B100B200B303840385038600B703880389038A00BB038C00BD038E038F 17 | 0390039103920393039403950396039703980399039A039B039C039D039E039F 18 | 03A003A1000003A303A403A503A603A703A803A903AA03AB03AC03AD03AE03AF 19 | 03B003B103B203B303B403B503B603B703B803B903BA03BB03BC03BD03BE03BF 20 | 03C003C103C203C303C403C503C603C703C803C903CA03CB03CC03CD03CE0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-8.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-8, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A0000000A200A300A400A500A600A700A800A900D700AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900F700BB00BC00BD00BE0000 17 | 0000000000000000000000000000000000000000000000000000000000000000 18 | 0000000000000000000000000000000000000000000000000000000000002017 19 | 05D005D105D205D305D405D505D605D705D805D905DA05DB05DC05DD05DE05DF 20 | 05E005E105E205E305E405E505E605E705E805E905EA00000000200E200F0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/iso8859-9.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: iso8859-9, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 00A000A100A200A300A400A500A600A700A800A900AA00AB00AC00AD00AE00AF 16 | 00B000B100B200B300B400B500B600B700B800B900BA00BB00BC00BD00BE00BF 17 | 00C000C100C200C300C400C500C600C700C800C900CA00CB00CC00CD00CE00CF 18 | 011E00D100D200D300D400D500D600D700D800D900DA00DB00DC0130015E00DF 19 | 00E000E100E200E300E400E500E600E700E800E900EA00EB00EC00ED00EE00EF 20 | 011F00F100F200F300F400F500F600F700F800F900FA00FB00FC0131015F00FF 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/jis0201.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: jis0201, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D203E007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 0000FF61FF62FF63FF64FF65FF66FF67FF68FF69FF6AFF6BFF6CFF6DFF6EFF6F 16 | FF70FF71FF72FF73FF74FF75FF76FF77FF78FF79FF7AFF7BFF7CFF7DFF7EFF7F 17 | FF80FF81FF82FF83FF84FF85FF86FF87FF88FF89FF8AFF8BFF8CFF8DFF8EFF8F 18 | FF90FF91FF92FF93FF94FF95FF96FF97FF98FF99FF9AFF9BFF9CFF9DFF9EFF9F 19 | 0000000000000000000000000000000000000000000000000000000000000000 20 | 0000000000000000000000000000000000000000000000000000000000000000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/koi8-r.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: koi8-r, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 25002502250C251025142518251C2524252C2534253C258025842588258C2590 14 | 259125922593232025A02219221A22482264226500A0232100B000B200B700F7 15 | 25502551255204512553255425552556255725582559255A255B255C255D255E 16 | 255F25602561040125622563256425652566256725682569256A256B256C00A9 17 | 044E0430043104460434043504440433044504380439043A043B043C043D043E 18 | 043F044F044004410442044304360432044C044B04370448044D04490447044A 19 | 042E0410041104260414041504240413042504180419041A041B041C041D041E 20 | 041F042F042004210422042304160412042C042B04170428042D04290427042A 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/koi8-u.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: koi8-u, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 25002502250C251025142518251C2524252C2534253C258025842588258C2590 14 | 259125922593232025A02219221A22482264226500A0232100B000B200B700F7 15 | 25502551255204510454255404560457255725582559255A255B0491255D255E 16 | 255F25602561040104032563040604072566256725682569256A0490256C00A9 17 | 044E0430043104460434043504440433044504380439043A043B043C043D043E 18 | 043F044F044004410442044304360432044C044B04370448044D04490447044A 19 | 042E0410041104260414041504240413042504180419041A041B041C041D041E 20 | 041F042F042004210422042304160412042C042B04170428042D04290427042A 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macCentEuro.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macCentEuro, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C40100010100C9010400D600DC00E10105010C00E4010D0106010700E90179 14 | 017A010E00ED010F01120113011600F3011700F400F600F500FA011A011B00FC 15 | 202000B0011800A300A7202200B600DF00AE00A92122011900A822600123012E 16 | 012F012A22642265012B0136220222110142013B013C013D013E0139013A0145 17 | 0146014300AC221A01440147220600AB00BB202600A00148015000D50151014C 18 | 20132014201C201D2018201900F725CA014D0154015501582039203A01590156 19 | 01570160201A201E0161015A015B00C10164016500CD017D017E016A00D300D4 20 | 016B016E00DA016F017001710172017300DD00FD0137017B0141017C012202C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macCroatian.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macCroatian, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400C500C700C900D100D600DC00E100E000E200E400E300E500E700E900E8 14 | 00EA00EB00ED00EC00EE00EF00F100F300F200F400F600F500FA00F900FB00FC 15 | 202000B000A200A300A7202200B600DF00AE0160212200B400A82260017D00D8 16 | 221E00B122642265220600B522022211220F0161222B00AA00BA03A9017E00F8 17 | 00BF00A100AC221A01922248010600AB010C202600A000C000C300D501520153 18 | 01102014201C201D2018201900F725CAF8FF00A9204420AC2039203A00C600BB 19 | 201300B7201A201E203000C2010700C1010D00C800CD00CE00CF00CC00D300D4 20 | 011100D200DA00DB00D9013102C602DC00AF03C000CB02DA00B800CA00E602C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macCyrillic.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macCyrillic, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0410041104120413041404150416041704180419041A041B041C041D041E041F 14 | 0420042104220423042404250426042704280429042A042B042C042D042E042F 15 | 202000B0049000A300A7202200B6040600AE00A9212204020452226004030453 16 | 221E00B122642265045600B504910408040404540407045704090459040A045A 17 | 0458040500AC221A01922248220600AB00BB202600A0040B045B040C045C0455 18 | 20132014201C201D2018201900F7201E040E045E040F045F211604010451044F 19 | 0430043104320433043404350436043704380439043A043B043C043D043E043F 20 | 0440044104420443044404450446044704480449044A044B044C044D044E20AC 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macDingbats.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macDingbats, single-byte 2 | S 3 | 003F 1 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 00202701270227032704260E2706270727082709261B261E270C270D270E270F 8 | 2710271127122713271427152716271727182719271A271B271C271D271E271F 9 | 2720272127222723272427252726272726052729272A272B272C272D272E272F 10 | 2730273127322733273427352736273727382739273A273B273C273D273E273F 11 | 2740274127422743274427452746274727482749274A274B25CF274D25A0274F 12 | 27502751275225B225BC25C6275625D727582759275A275B275C275D275E007F 13 | F8D7F8D8F8D9F8DAF8DBF8DCF8DDF8DEF8DFF8E0F8E1F8E2F8E3F8E4008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 0000276127622763276427652766276726632666266526602460246124622463 16 | 2464246524662467246824692776277727782779277A277B277C277D277E277F 17 | 2780278127822783278427852786278727882789278A278B278C278D278E278F 18 | 2790279127922793279421922194219527982799279A279B279C279D279E279F 19 | 27A027A127A227A327A427A527A627A727A827A927AA27AB27AC27AD27AE27AF 20 | 000027B127B227B327B427B527B627B727B827B927BA27BB27BC27BD27BE0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macGreek.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macGreek, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400B900B200C900B300D600DC038500E000E200E4038400A800E700E900E8 14 | 00EA00EB00A3212200EE00EF202200BD203000F400F600A600AD00F900FB00FC 15 | 2020039303940398039B039E03A000DF00AE00A903A303AA00A7226000B000B7 16 | 039100B12264226500A503920395039603970399039A039C03A603AB03A803A9 17 | 03AC039D00AC039F03A1224803A400AB00BB202600A003A503A7038603880153 18 | 20132015201C201D2018201900F70389038A038C038E03AD03AE03AF03CC038F 19 | 03CD03B103B203C803B403B503C603B303B703B903BE03BA03BB03BC03BD03BF 20 | 03C003CE03C103C303C403B803C903C203C703C503B603CA03CB039003B0F8A0 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macIceland.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macIceland, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400C500C700C900D100D600DC00E100E000E200E400E300E500E700E900E8 14 | 00EA00EB00ED00EC00EE00EF00F100F300F200F400F600F500FA00F900FB00FC 15 | 00DD00B000A200A300A7202200B600DF00AE00A9212200B400A8226000C600D8 16 | 221E00B12264226500A500B522022211220F03C0222B00AA00BA03A900E600F8 17 | 00BF00A100AC221A01922248220600AB00BB202600A000C000C300D501520153 18 | 20132014201C201D2018201900F725CA00FF0178204420AC00D000F000DE00FE 19 | 00FD00B7201A201E203000C200CA00C100CB00C800CD00CE00CF00CC00D300D4 20 | F8FF00D200DA00DB00D9013102C602DC00AF02D802D902DA00B802DD02DB02C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macRoman.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macRoman, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400C500C700C900D100D600DC00E100E000E200E400E300E500E700E900E8 14 | 00EA00EB00ED00EC00EE00EF00F100F300F200F400F600F500FA00F900FB00FC 15 | 202000B000A200A300A7202200B600DF00AE00A9212200B400A8226000C600D8 16 | 221E00B12264226500A500B522022211220F03C0222B00AA00BA03A900E600F8 17 | 00BF00A100AC221A01922248220600AB00BB202600A000C000C300D501520153 18 | 20132014201C201D2018201900F725CA00FF0178204420AC2039203AFB01FB02 19 | 202100B7201A201E203000C200CA00C100CB00C800CD00CE00CF00CC00D300D4 20 | F8FF00D200DA00DB00D9013102C602DC00AF02D802D902DA00B802DD02DB02C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macRomania.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macRomania, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400C500C700C900D100D600DC00E100E000E200E400E300E500E700E900E8 14 | 00EA00EB00ED00EC00EE00EF00F100F300F200F400F600F500FA00F900FB00FC 15 | 202000B000A200A300A7202200B600DF00AE00A9212200B400A822600102015E 16 | 221E00B12264226500A500B522022211220F03C0222B00AA00BA21260103015F 17 | 00BF00A100AC221A01922248220600AB00BB202600A000C000C300D501520153 18 | 20132014201C201D2018201900F725CA00FF0178204400A42039203A01620163 19 | 202100B7201A201E203000C200CA00C100CB00C800CD00CE00CF00CC00D300D4 20 | F8FF00D200DA00DB00D9013102C602DC00AF02D802D902DA00B802DD02DB02C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macThai.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macThai, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00AB00BB2026F88CF88FF892F895F898F88BF88EF891F894F897201C201DF899 14 | FFFD2022F884F889F885F886F887F888F88AF88DF890F893F89620182019FFFD 15 | 00A00E010E020E030E040E050E060E070E080E090E0A0E0B0E0C0E0D0E0E0E0F 16 | 0E100E110E120E130E140E150E160E170E180E190E1A0E1B0E1C0E1D0E1E0E1F 17 | 0E200E210E220E230E240E250E260E270E280E290E2A0E2B0E2C0E2D0E2E0E2F 18 | 0E300E310E320E330E340E350E360E370E380E390E3AFEFF200B201320140E3F 19 | 0E400E410E420E430E440E450E460E470E480E490E4A0E4B0E4C0E4D21220E4F 20 | 0E500E510E520E530E540E550E560E570E580E5900AE00A9FFFDFFFDFFFDFFFD 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macTurkish.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macTurkish, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 00C400C500C700C900D100D600DC00E100E000E200E400E300E500E700E900E8 14 | 00EA00EB00ED00EC00EE00EF00F100F300F200F400F600F500FA00F900FB00FC 15 | 202000B000A200A300A7202200B600DF00AE00A9212200B400A8226000C600D8 16 | 221E00B12264226500A500B522022211220F03C0222B00AA00BA03A900E600F8 17 | 00BF00A100AC221A01922248220600AB00BB202600A000C000C300D501520153 18 | 20132014201C201D2018201900F725CA00FF0178011E011F01300131015E015F 19 | 202100B7201A201E203000C200CA00C100CB00C800CD00CE00CF00CC00D300D4 20 | F8FF00D200DA00DB00D9F8A002C602DC00AF02D802D902DA00B802DD02DB02C7 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/macUkraine.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: macUkraine, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E007F 13 | 0410041104120413041404150416041704180419041A041B041C041D041E041F 14 | 0420042104220423042404250426042704280429042A042B042C042D042E042F 15 | 202000B0049000A300A7202200B6040600AE00A9212204020452226004030453 16 | 221E00B122642265045600B504910408040404540407045704090459040A045A 17 | 0458040500AC221A01922248220600AB00BB202600A0040B045B040C045C0455 18 | 20132014201C201D2018201900F7201E040E045E040F045F211604010451044F 19 | 0430043104320433043404350436043704380439043A043B043C043D043E043F 20 | 0440044104420443044404450446044704480449044A044B044C044D044E00A4 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/symbol.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: symbol, single-byte 2 | S 3 | 003F 1 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002122000023220300250026220D002800292217002B002C2212002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 22450391039203A70394039503A603930397039903D1039A039B039C039D039F 10 | 03A0039803A103A303A403A503C203A9039E03A80396005B2234005D22A5005F 11 | F8E503B103B203C703B403B503C603B303B703B903D503BA03BB03BC03BD03BF 12 | 03C003B803C103C303C403C503D603C903BE03C803B6007B007C007D223C007F 13 | 0080008100820083008400850086008700880089008A008B008C008D008E008F 14 | 0090009100920093009400950096009700980099009A009B009C009D009E009F 15 | 000003D2203222642044221E0192266326662665266021942190219121922193 16 | 00B000B12033226500D7221D2202202200F72260226122482026F8E6F8E721B5 17 | 21352111211C21182297229522052229222A2283228722842282228622082209 18 | 2220220700AE00A92122220F221A22C500AC2227222821D421D021D121D221D3 19 | 22C42329F8E8F8E9F8EA2211F8EBF8ECF8EDF8EEF8EFF8F0F8F1F8F2F8F3F8F4 20 | F8FF232A222B2320F8F52321F8F6F8F7F8F8F8F9F8FAF8FBF8FCF8FDF8FE0000 21 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/encoding/tis-620.enc: -------------------------------------------------------------------------------- 1 | # Encoding file: tis-620, single-byte 2 | S 3 | 003F 0 1 4 | 00 5 | 0000000100020003000400050006000700080009000A000B000C000D000E000F 6 | 0010001100120013001400150016001700180019001A001B001C001D001E001F 7 | 0020002100220023002400250026002700280029002A002B002C002D002E002F 8 | 0030003100320033003400350036003700380039003A003B003C003D003E003F 9 | 0040004100420043004400450046004700480049004A004B004C004D004E004F 10 | 0050005100520053005400550056005700580059005A005B005C005D005E005F 11 | 0060006100620063006400650066006700680069006A006B006C006D006E006F 12 | 0070007100720073007400750076007700780079007A007B007C007D007E0000 13 | 0000000000000000000000000000000000000000000000000000000000000000 14 | 0000000000000000000000000000000000000000000000000000000000000000 15 | 00000E010E020E030E040E050E060E070E080E090E0A0E0B0E0C0E0D0E0E0E0F 16 | 0E100E110E120E130E140E150E160E170E180E190E1A0E1B0E1C0E1D0E1E0E1F 17 | 0E200E210E220E230E240E250E260E270E280E290E2A0E2B0E2C0E2D0E2E0E2F 18 | 0E300E310E320E330E340E350E360E370E380E390E3A00000000000000000E3F 19 | 0E400E410E420E430E440E450E460E470E480E490E4A0E4B0E4C0E4D0E4E0E4F 20 | 0E500E510E520E530E540E550E560E570E580E590E5A0E5B0000000000000000 -------------------------------------------------------------------------------- /dist/lib/tcl8.6/http1.0/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # Tcl package index file, version 1.0 2 | # This file is generated by the "pkg_mkIndex" command 3 | # and sourced either when an application starts up or 4 | # by a "package unknown" script. It invokes the 5 | # "package ifneeded" command to set up package-related 6 | # information so that packages will be loaded automatically 7 | # in response to "package require" commands. When this 8 | # script is sourced, the variable $dir must contain the 9 | # full path name of this file's directory. 10 | 11 | package ifneeded http 1.0 [list tclPkgSetup $dir http 1.0 {{http.tcl source {httpCopyDone httpCopyStart httpEof httpEvent httpFinish httpMapReply httpProxyRequired http_code http_config http_data http_formatQuery http_get http_reset http_size http_status http_wait}}}] 12 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/opt0.4/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # Tcl package index file, version 1.1 2 | # This file is generated by the "pkg_mkIndex -direct" command 3 | # and sourced either when an application starts up or 4 | # by a "package unknown" script. It invokes the 5 | # "package ifneeded" command to set up package-related 6 | # information so that packages will be loaded automatically 7 | # in response to "package require" commands. When this 8 | # script is sourced, the variable $dir must contain the 9 | # full path name of this file's directory. 10 | 11 | if {![package vsatisfies [package provide Tcl] 8.2]} {return} 12 | package ifneeded opt 0.4.6 [list source [file join $dir optparse.tcl]] 13 | -------------------------------------------------------------------------------- /dist/lib/tcl8.6/parray.tcl: -------------------------------------------------------------------------------- 1 | # parray: 2 | # Print the contents of a global array on stdout. 3 | # 4 | # Copyright (c) 1991-1993 The Regents of the University of California. 5 | # Copyright (c) 1994 Sun Microsystems, Inc. 6 | # 7 | # See the file "license.terms" for information on usage and redistribution 8 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 9 | # 10 | 11 | proc parray {a {pattern *}} { 12 | upvar 1 $a array 13 | if {![array exists array]} { 14 | return -code error "\"$a\" isn't an array" 15 | } 16 | set maxl 0 17 | set names [lsort [array names array $pattern]] 18 | foreach name $names { 19 | if {[string length $name] > $maxl} { 20 | set maxl [string length $name] 21 | } 22 | } 23 | set maxl [expr {$maxl + [string length $a] + 2}] 24 | foreach name $names { 25 | set nameString [format %s(%s) $a $name] 26 | puts stdout [format "%-*s = %s" $maxl $nameString $array($name)] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dist/lib/tk8.6/optMenu.tcl: -------------------------------------------------------------------------------- 1 | # optMenu.tcl -- 2 | # 3 | # This file defines the procedure tk_optionMenu, which creates 4 | # an option button and its associated menu. 5 | # 6 | # Copyright (c) 1994 The Regents of the University of California. 7 | # Copyright (c) 1994 Sun Microsystems, Inc. 8 | # 9 | # See the file "license.terms" for information on usage and redistribution 10 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 11 | # 12 | 13 | # ::tk_optionMenu -- 14 | # This procedure creates an option button named $w and an associated 15 | # menu. Together they provide the functionality of Motif option menus: 16 | # they can be used to select one of many values, and the current value 17 | # appears in the global variable varName, as well as in the text of 18 | # the option menubutton. The name of the menu is returned as the 19 | # procedure's result, so that the caller can use it to change configuration 20 | # options on the menu or otherwise manipulate it. 21 | # 22 | # Arguments: 23 | # w - The name to use for the menubutton. 24 | # varName - Global variable to hold the currently selected value. 25 | # firstValue - First of legal values for option (must be >= 1). 26 | # args - Any number of additional values. 27 | 28 | proc ::tk_optionMenu {w varName firstValue args} { 29 | upvar #0 $varName var 30 | 31 | if {![info exists var]} { 32 | set var $firstValue 33 | } 34 | menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ 35 | -relief raised -highlightthickness 1 -anchor c \ 36 | -direction flush 37 | menu $w.menu -tearoff 0 38 | $w.menu add radiobutton -label $firstValue -variable $varName 39 | foreach i $args { 40 | $w.menu add radiobutton -label $i -variable $varName 41 | } 42 | return $w.menu 43 | } 44 | -------------------------------------------------------------------------------- /dist/lib/tk8.6/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | if {[catch {package present Tcl 8.6.0}]} { return } 2 | if {($::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)] 3 | || ([info exists ::argv] && ("-display" in $::argv)))} { 4 | package ifneeded Tk 8.6.8 [list load [file join $dir .. .. bin libtk8.6.dll] Tk] 5 | } else { 6 | package ifneeded Tk 8.6.8 [list load [file join $dir .. .. bin tk86t.dll] Tk] 7 | } 8 | -------------------------------------------------------------------------------- /dist/lib/tk8.6/ttk/progress.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Ttk widget set: progress bar utilities. 3 | # 4 | 5 | namespace eval ttk::progressbar { 6 | variable Timers ;# Map: widget name -> after ID 7 | } 8 | 9 | # Autoincrement -- 10 | # Periodic callback procedure for autoincrement mode 11 | # 12 | proc ttk::progressbar::Autoincrement {pb steptime stepsize} { 13 | variable Timers 14 | 15 | if {![winfo exists $pb]} { 16 | # widget has been destroyed -- cancel timer 17 | unset -nocomplain Timers($pb) 18 | return 19 | } 20 | 21 | set Timers($pb) [after $steptime \ 22 | [list ttk::progressbar::Autoincrement $pb $steptime $stepsize] ] 23 | 24 | $pb step $stepsize 25 | } 26 | 27 | # ttk::progressbar::start -- 28 | # Start autoincrement mode. Invoked by [$pb start] widget code. 29 | # 30 | proc ttk::progressbar::start {pb {steptime 50} {stepsize 1}} { 31 | variable Timers 32 | if {![info exists Timers($pb)]} { 33 | Autoincrement $pb $steptime $stepsize 34 | } 35 | } 36 | 37 | # ttk::progressbar::stop -- 38 | # Cancel autoincrement mode. Invoked by [$pb stop] widget code. 39 | # 40 | proc ttk::progressbar::stop {pb} { 41 | variable Timers 42 | if {[info exists Timers($pb)]} { 43 | after cancel $Timers($pb) 44 | unset Timers($pb) 45 | } 46 | $pb configure -value 0 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /dist/music-score-1.1.3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/music-score-1.1.3.tar.gz -------------------------------------------------------------------------------- /dist/notepad-1.3.5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/notepad-1.3.5.tar.gz -------------------------------------------------------------------------------- /dist/number-guessing-1.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/number-guessing-1.0.1.tar.gz -------------------------------------------------------------------------------- /dist/pickle/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/_ctypes.pyd -------------------------------------------------------------------------------- /dist/pickle/_tkinter.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/_tkinter.pyd -------------------------------------------------------------------------------- /dist/pickle/library.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/library.zip -------------------------------------------------------------------------------- /dist/pickle/pickle.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/pickle.ico -------------------------------------------------------------------------------- /dist/pickle/pklReader.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/pklReader.exe -------------------------------------------------------------------------------- /dist/pickle/python37.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/python37.dll -------------------------------------------------------------------------------- /dist/pickle/tcl86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/tcl86t.dll -------------------------------------------------------------------------------- /dist/pickle/tk86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pickle/tk86t.dll -------------------------------------------------------------------------------- /dist/py2exe_con.py: -------------------------------------------------------------------------------- 1 | # 用py2exe打包exe的脚本(有黑色console窗口) 2 | from traceback import print_exc as p 3 | import sys,os 4 | try: 5 | from distutils.core import setup 6 | import py2exe 7 | #os.chdir('d:\\it\\python') 8 | 9 | if len(sys.argv) > 1: 10 | args=sys.argv[1:] 11 | sys.argv[1]='py2exe' 12 | del sys.argv[2:] 13 | for file in args: 14 | print('File:',file) 15 | icon=input('图标:') 16 | try:setup(console=[{'script':file, 17 | 'icon_resources': [(1,os.path.realpath(icon))] if icon else []}]) 18 | except:p() 19 | except: 20 | p() 21 | os.system('pause') 22 | -------------------------------------------------------------------------------- /dist/py2exe_w.py: -------------------------------------------------------------------------------- 1 | # 用py2exe打包exe的脚本(无黑色console窗口) 2 | from traceback import print_exc as p 3 | import sys,os 4 | try: 5 | from distutils.core import setup 6 | import py2exe 7 | #os.chdir('d:\\it\\python') 8 | 9 | if len(sys.argv) > 1: 10 | args=sys.argv[1:] 11 | sys.argv[1]='py2exe' 12 | del sys.argv[2:] 13 | for file in args: 14 | print('File:',file) 15 | icon=input('图标:') 16 | try:setup(windows=[{'script':file, 17 | 'icon_resources': [(1,os.path.realpath(icon))] if icon else []}]) 18 | except:p() 19 | except: 20 | p() 21 | os.system('pause') 22 | -------------------------------------------------------------------------------- /dist/pycodeobject-1.0.5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pycodeobject-1.0.5.tar.gz -------------------------------------------------------------------------------- /dist/pynotepad/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/_ctypes.pyd -------------------------------------------------------------------------------- /dist/pynotepad/_tkinter.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/_tkinter.pyd -------------------------------------------------------------------------------- /dist/pynotepad/library.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/library.zip -------------------------------------------------------------------------------- /dist/pynotepad/notepad.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/notepad.ico -------------------------------------------------------------------------------- /dist/pynotepad/pynotepad.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/pynotepad.exe -------------------------------------------------------------------------------- /dist/pynotepad/python37.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/python37.dll -------------------------------------------------------------------------------- /dist/pynotepad/tcl86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/tcl86t.dll -------------------------------------------------------------------------------- /dist/pynotepad/tk86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/tk86t.dll -------------------------------------------------------------------------------- /dist/pynotepad/winsound.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pynotepad/winsound.pyd -------------------------------------------------------------------------------- /dist/pyshell/_bz2.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_bz2.pyd -------------------------------------------------------------------------------- /dist/pyshell/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_ctypes.pyd -------------------------------------------------------------------------------- /dist/pyshell/_hashlib.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_hashlib.pyd -------------------------------------------------------------------------------- /dist/pyshell/_lzma.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_lzma.pyd -------------------------------------------------------------------------------- /dist/pyshell/_queue.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_queue.pyd -------------------------------------------------------------------------------- /dist/pyshell/_socket.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_socket.pyd -------------------------------------------------------------------------------- /dist/pyshell/_ssl.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_ssl.pyd -------------------------------------------------------------------------------- /dist/pyshell/_tkinter.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/_tkinter.pyd -------------------------------------------------------------------------------- /dist/pyshell/autoexec.py: -------------------------------------------------------------------------------- 1 | # autoexec.py, PyShell运行时首先自动执行该文件 2 | # 可在下面输入您自己的代码并保存 -------------------------------------------------------------------------------- /dist/pyshell/libcrypto-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/libcrypto-1_1.dll -------------------------------------------------------------------------------- /dist/pyshell/library.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/library.zip -------------------------------------------------------------------------------- /dist/pyshell/libssl-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/libssl-1_1.dll -------------------------------------------------------------------------------- /dist/pyshell/pyexpat.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/pyexpat.pyd -------------------------------------------------------------------------------- /dist/pyshell/pyshell.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/pyshell.exe -------------------------------------------------------------------------------- /dist/pyshell/pyshell_w.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/pyshell_w.exe -------------------------------------------------------------------------------- /dist/pyshell/python37.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/python37.dll -------------------------------------------------------------------------------- /dist/pyshell/select.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/select.pyd -------------------------------------------------------------------------------- /dist/pyshell/tcl86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/tcl86t.dll -------------------------------------------------------------------------------- /dist/pyshell/tk86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/tk86t.dll -------------------------------------------------------------------------------- /dist/pyshell/unicodedata.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/unicodedata.pyd -------------------------------------------------------------------------------- /dist/pyshell/winsound.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/pyshell/winsound.pyd -------------------------------------------------------------------------------- /dist/search-file-1.2.3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/search-file-1.2.3.tar.gz -------------------------------------------------------------------------------- /dist/simple-database-1.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/simple-database-1.0.1.tar.gz -------------------------------------------------------------------------------- /dist/turtlestar-1.0.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/turtlestar-1.0.4.tar.gz -------------------------------------------------------------------------------- /dist/ulang2-0.2.2.4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/ulang2-0.2.2.4.tar.gz -------------------------------------------------------------------------------- /dist/文件修改日期/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/_ctypes.pyd -------------------------------------------------------------------------------- /dist/文件修改日期/_tkinter.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/_tkinter.pyd -------------------------------------------------------------------------------- /dist/文件修改日期/library.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/library.zip -------------------------------------------------------------------------------- /dist/文件修改日期/python37.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/python37.dll -------------------------------------------------------------------------------- /dist/文件修改日期/tcl86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/tcl86t.dll -------------------------------------------------------------------------------- /dist/文件修改日期/tk86t.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/tk86t.dll -------------------------------------------------------------------------------- /dist/文件修改日期/文件修改日期gui.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/dist/文件修改日期/文件修改日期gui.exe -------------------------------------------------------------------------------- /event/__init__.py: -------------------------------------------------------------------------------- 1 | """模拟键盘,鼠标事件的Python包。可用于编写自动化程序 (如游戏外挂)。 2 | A Python package simulating keyboard and mouse events ,which can be used in automation programs.""" 3 | __email__="3076711200@qq.com" 4 | __author__="七分诚意 qq:3076711200" 5 | __version__="1.1.1" 6 | import event.key as key 7 | import event.mouse as mouse 8 | -------------------------------------------------------------------------------- /event/examples/__init__.py: -------------------------------------------------------------------------------- 1 | from event.examples.mouseController import * -------------------------------------------------------------------------------- /event/examples/mouseController.py: -------------------------------------------------------------------------------- 1 | """鼠标控制器""" 2 | import tkinter as tk 3 | import tkinter.ttk as ttk 4 | from event.mouse import * 5 | 6 | def main(): 7 | 8 | def dec(func): 9 | def _(event): 10 | x,y=func(*getpos()) 11 | goto(x,y) 12 | return _ 13 | 14 | @dec 15 | def up(x,y):return x,y-int(dt.get()) 16 | @dec 17 | def down(x,y):return x,y+int(dt.get()) 18 | @dec 19 | def left(x,y):return x-int(dt.get()),y 20 | @dec 21 | def right(x,y):return x+int(dt.get()),y 22 | 23 | root=tk.Tk() 24 | root.resizable(False,False) 25 | root.title("鼠标控制器") 26 | 27 | instruction="""说明: 按Alt+Tab键切换到本窗口, 28 | 按↑,↓,←,→键移动鼠标, 29 | 按Enter键单击鼠标, 30 | 按Shift+Enter键右键单击鼠标, 31 | 按Alt+Enter键双击鼠标。""" 32 | tk.Label(root,text=instruction).pack() 33 | tk.Label(root,text="鼠标移动速度: ").pack(side=tk.LEFT) 34 | dt=ttk.Spinbox(root,from_=1,to=100) 35 | dt.set(8) 36 | dt.pack() 37 | 38 | root.bind("",up) 39 | root.bind("",down) 40 | root.bind("",left) 41 | root.bind("",right) 42 | root.bind("",lambda event:click()) 43 | root.bind("",lambda event:right_click()) 44 | root.bind("",lambda event:dblclick()) 45 | 46 | root.mainloop() 47 | 48 | if __name__=="__main__":main() 49 | -------------------------------------------------------------------------------- /opengl/3d_test.py: -------------------------------------------------------------------------------- 1 | import pyglet 2 | from pyglet.gl import * 3 | from pyglet.window import key 4 | 5 | pos = [0, 0, -20] 6 | rot_y = 0 7 | 8 | win = pyglet.window.Window(height=500, width=500) 9 | 10 | @win.event 11 | def on_draw(): 12 | global rot_y 13 | print('Drawing pos:%s rot_y:%.3f' % (str(pos),rot_y)) 14 | 15 | glMatrixMode(GL_PROJECTION) 16 | glLoadIdentity() 17 | gluPerspective(90, 1, 0.1, 100) 18 | 19 | glMatrixMode(GL_MODELVIEW) 20 | glLoadIdentity() 21 | 22 | glTranslatef(*pos) 23 | glRotatef(rot_y, 0, 1, 0) 24 | 25 | win.clear() # 或glClear(GL_COLOR_BUFFER_BIT) 26 | gluLookAt(0, 0, 0, -5, -5, 0, 0, 1, 0) 27 | 28 | glBegin(GL_POLYGON) 29 | glColor3f(0, 1, 1) 30 | glVertex3f(-5,-5,0) 31 | glVertex3f(5,-5,0) 32 | glVertex3f(0,5,0) 33 | glColor3f(1, 0, 1) 34 | glVertex3f(5,-5,5) 35 | glVertex3f(5,-5,-5) 36 | glEnd() 37 | 38 | glFlush() 39 | 40 | @win.event 41 | def on_key_press(s,m): 42 | global rot_y 43 | print("Pressed key:",s) 44 | if s == key.S: 45 | pos[2] -= 1 46 | if s == key.W: 47 | pos[2] += 1 48 | if s == key.A: 49 | rot_y += 5 50 | if s == key.D: 51 | rot_y -= 5 52 | 53 | glClearColor(1, 1, 0.8, 1) 54 | gluLookAt(4, 2, 4, 0, 0, 0, 0, 1, 0) 55 | pyglet.app.run() 56 | -------------------------------------------------------------------------------- /opengl/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者使用PyOpenGL、pyglet库开发的3D程序 (除3d_test.py来自网络外)。 -------------------------------------------------------------------------------- /pygame/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者的pygame项目, 如碰撞模拟等。 2 | (现代艺术.py非作者编写) -------------------------------------------------------------------------------- /pygame/beach_ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/pygame/beach_ball.png -------------------------------------------------------------------------------- /pygame/现代艺术.py: -------------------------------------------------------------------------------- 1 | # 来自其他项目 2 | import pygame,random,sys 3 | from pygame.colordict import THECOLORS 4 | 5 | SCREEN_SIZE=WIDTH,HEIGHT=640,480;BACKCOLOR=255,255,255 6 | def mainloop(screen): 7 | "主事件循环" 8 | while True: 9 | for event in pygame.event.get(): 10 | if event.type==pygame.QUIT: 11 | pygame.quit() 12 | return 0 13 | elif event.type==pygame.MOUSEBUTTONDOWN: 14 | draw(screen) 15 | 16 | def draw(scr): 17 | scr.fill(BACKCOLOR) 18 | availble_colors=list(THECOLORS.keys()) 19 | for n in range(100): 20 | #随机选择矩形位置和颜色 21 | width=random.randrange(0,250) 22 | height=random.randrange(0,100) 23 | left=random.randrange(0,400) 24 | top=random.randrange(0,500) 25 | color = THECOLORS[random.choice(availble_colors)] 26 | line_width=random.randrange(1,3) 27 | pygame.draw.rect(scr,color,(left,top,width,height),line_width) 28 | pygame.display.flip() 29 | 30 | def main(): 31 | scr=pygame.display.set_mode(SCREEN_SIZE) 32 | pygame.display.set_caption("现代艺术") 33 | draw(scr) 34 | return mainloop(scr) 35 | 36 | if __name__=="__main__":sys.exit(main()) 37 | -------------------------------------------------------------------------------- /run_pylint.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem 关闭部分不必要的提示和警告 3 | python -m pylint %* --disable=C0326 --disable=C0103 --disable=C0115 --disable=C0116 --disable=C0321 --disable=C0410 --disable=W0614 --disable=W0401 --disable=W0641 --disable=W0212 --disable=R0902 --disable=W0613 --disable=C0123 --disable=W0603 --disable=R0914 --disable=R0913 --disable=W0212 --disable=R0912 --disable=R0915 --disable=R0801 4 | pause -------------------------------------------------------------------------------- /ulang/__init__.py: -------------------------------------------------------------------------------- 1 | # uncompyle6 version 3.7.4 2 | # Python bytecode 3.7 (3394) 3 | # Decompiled from: Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 22:09:03) [MSC v.1916 32 bit (Intel)] 4 | # Embedded file name: ulang\__init__.py 5 | from ulang.parser.core import Parser 6 | from ulang.runtime.main import main 7 | __version__ = '0.2.2.3'# 原为0.2.2.2 8 | __all__ = ['Parser', 'main'] 9 | # okay decompiling E:\ulang\ulang-0.2.2.exe_extracted\PYZ-00.pyz_extracted\ulang.pyc -------------------------------------------------------------------------------- /ulang/__main__.py: -------------------------------------------------------------------------------- 1 | import sys,os 2 | try: 3 | from ulang.runtime.main import main 4 | except ImportError: 5 | # 直接双击运行__main__.py 6 | try: 7 | sys.path.remove(os.getcwd()) 8 | except:pass 9 | sys.path.append(os.path.split(os.getcwd())[0]) 10 | from ulang.runtime.main import main 11 | 12 | if sys.argv[0].endswith('__main__.py'): 13 | sys.argv[0]='python -m ulang' 14 | 15 | if __name__=="__main__":main() -------------------------------------------------------------------------------- /ulang/codegen/__init__.py: -------------------------------------------------------------------------------- 1 | # uncompyle6 version 3.7.4 2 | # Python bytecode 3.7 (3394) 3 | # Decompiled from: Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 22:09:03) [MSC v.1916 32 bit (Intel)] 4 | # Embedded file name: ulang\codegen\__init__.py 5 | pass 6 | # okay decompiling E:\ulang\ulang-0.2.2.exe_extracted\PYZ-00.pyz_extracted\ulang.codegen.pyc 7 | -------------------------------------------------------------------------------- /ulang/parser/__init__.py: -------------------------------------------------------------------------------- 1 | # uncompyle6 version 3.7.4 2 | # Python bytecode 3.7 (3394) 3 | # Decompiled from: Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 22:09:03) [MSC v.1916 32 bit (Intel)] 4 | # Embedded file name: ulang\parser\__init__.py 5 | pass 6 | # okay decompiling E:\ulang\ulang-0.2.2.exe_extracted\PYZ-00.pyz_extracted\ulang.parser.pyc 7 | -------------------------------------------------------------------------------- /ulang/parser/core (备用 reserved).pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/parser/core (备用 reserved).pyc -------------------------------------------------------------------------------- /ulang/parser/error.py: -------------------------------------------------------------------------------- 1 | # uncompyle6 version 3.7.4 2 | # Python bytecode 3.7 (3394) 3 | # Decompiled from: Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 22:09:03) [MSC v.1916 32 bit (Intel)] 4 | # Embedded file name: ulang\parser\error.py 5 | 6 | 7 | class SyntaxError(ValueError): 8 | 9 | def __init__(self, message, filename, lineno, colno, source=None): 10 | self.message_ = message 11 | self.filename_ = filename 12 | self.lineno_ = lineno if lineno > 0 else 1 13 | self.colno_ = colno if colno > 0 else 1 14 | self.source_ = source 15 | 16 | def __str__(self): 17 | msg = 'File "%s", line %d:%d, %s' % ( 18 | self.filename_, self.lineno_, self.colno_, self.message_) 19 | if self.source_: 20 | line = self.source_[(self.lineno_ - 1)] 21 | col = ' ' * (self.colno_ - 1) + '^' 22 | msg = '%s\n%s\n%s' % (msg, line, col) 23 | return msg 24 | # okay decompiling E:\ulang\ulang-0.2.2.exe_extracted\PYZ-00.pyz_extracted\ulang.parser.error.pyc 25 | -------------------------------------------------------------------------------- /ulang/runtime/__init__.py: -------------------------------------------------------------------------------- 1 | # uncompyle6 version 3.7.4 2 | # Python bytecode 3.7 (3394) 3 | # Decompiled from: Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 22:09:03) [MSC v.1916 32 bit (Intel)] 4 | # Embedded file name: ulang\runtime\__init__.py 5 | pass 6 | # okay decompiling E:\ulang\ulang-0.2.2.exe_extracted\PYZ-00.pyz_extracted\ulang.runtime.pyc 7 | -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/__init__.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/__main__.py: -------------------------------------------------------------------------------- 1 | import sys,os 2 | try: 3 | from ulang.runtime.main import main 4 | except ImportError: 5 | # 直接双击运行__main__.py 6 | try: 7 | sys.path.remove(os.getcwd()) 8 | except:pass 9 | sys.path.append(os.path.split(os.getcwd())[0]) 10 | from ulang.runtime.main import main 11 | 12 | if sys.argv[0].endswith('__main__.py'): 13 | sys.argv[0]='python -m ulang' 14 | 15 | if __name__=="__main__":main() -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/codegen/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/codegen/__init__.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/codegen/blockly.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/codegen/blockly.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/codegen/python.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/codegen/python.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/codegen/ulgen.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/codegen/ulgen.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/__init__.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/core.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/core.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/error.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/error.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/lexer.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/lexer.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/lrparser.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/lrparser.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/parser/parsergenerator.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/parser/parsergenerator.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/runtime/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/runtime/__init__.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/runtime/env.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/runtime/env.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/runtime/main.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/runtime/main.pyc -------------------------------------------------------------------------------- /ulang/ulang (pyc文件)/runtime/repl.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/ulang/ulang (pyc文件)/runtime/repl.pyc -------------------------------------------------------------------------------- /ulang/补丁使用说明.txt: -------------------------------------------------------------------------------- 1 | 1. 如何安装 2 | 在"用户目录\AppData\Local"目录下新建一个"rply\rply\cache"的3层文件夹, 将"补丁.json"复制到新建的cache目录下, 并重命名为"ulang_grammar-1-a758abb29bcd339d38a1212c87b0bc5287578f13.json", 重启ulang, 测试。 3 | 注: AppData文件夹默认是隐藏的, 可能需要恢复显示。 4 | 5 | 2.为什么需要此补丁 6 | 用uncompyle6反编译生成的py文件(尤其是parser部分, 有少量bug, 导致了不能自动生成语法树文件(也就是上述的补丁.json)。 7 | TODO: 修复不能自动生成语法树文件的bug。 8 | 9 | 附完整错误信息: 10 | Traceback (most recent call last): 11 | File "E:\Python\ulang\__main__.py", line 10, in 12 | from ulang.runtime.main import main 13 | File "E:\Python\ulang\__init__.py", line 5, in 14 | from ulang.parser.core import Parser 15 | File "E:\Python\ulang\parser\core.py", line 129, in 16 | class Parser: 17 | File "E:\Python\ulang\parser\core.py", line 1643, in Parser 18 | parser_ = LRParser(pg_.build()) 19 | File "E:\Python\ulang\parser\parsergenerator.py", line 162, in build 20 | table = LRTable.from_grammar(g) 21 | File "E:\Python\ulang\parser\parsergenerator.py", line 253, in from_grammar 22 | C = cls.lr0_items(grammar, add_count, cidhash, goto_cache) 23 | File "E:\Python\ulang\parser\parsergenerator.py", line 383, in lr0_items 24 | g = cls.lr0_goto(I, x, add_count, goto_cache) 25 | File "E:\Python\ulang\parser\parsergenerator.py", line 423, in lr0_goto 26 | s = s1 27 | UnboundLocalError: local variable 's1' referenced before assignment 28 | copyright 2020-2022.3 qfcy -------------------------------------------------------------------------------- /命令行/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者编写的命令行程序, 需要在命令行(cmd/powershell等)中运行。 2 | (curses_editor.py和snake.py, 以及database.py的一部分非作者编写) -------------------------------------------------------------------------------- /命令行/compile.py: -------------------------------------------------------------------------------- 1 | "compile.py - 用于编译python文件的脚本" 2 | import sys,os,shutil 3 | currdir = os.path.split(__file__)[0] 4 | if len(sys.argv) > 1: 5 | import py_compile 6 | for filename in sys.argv[1:]: 7 | if os.path.isfile(filename): 8 | pycfile = py_compile.compile(filename)#,optimize=2) 9 | print('已编译文件 ' + filename) 10 | if os.path.isfile(pycfile): 11 | shutil.copy(pycfile, os.path.splitext(filename)[0]+".pyc" ) 12 | print('复制 {} 到 {}'.format(pycfile, 13 | os.path.splitext(filename)[0]+".pyc")) 14 | elif os.path.isdir(filename): 15 | import compileall 16 | compileall.compile_dir(filename, maxlevels=50) # optimize=1 17 | print('已编译文件夹 ' + filename) 18 | 19 | else: 20 | print("欢迎使用",__doc__,end='\n\n') 21 | result = input('是否编译当前目录 (%s) 下的所有文件?' % currdir) 22 | if result.lower().startswith('y'): 23 | import compileall 24 | compileall.compile_dir(currdir, maxlevels=50) # optimize=1 25 | -------------------------------------------------------------------------------- /命令行/curses_editor.py: -------------------------------------------------------------------------------- 1 | #使用curse模块制作的文本编辑器,由其他项目改编 2 | import curses,sys 3 | from curses.textpad import Textbox, rectangle 4 | import msgbox 5 | msgbox.init() # 需要目录"小项目\面向对象"中的msgbox.py, 用于在消息框中显示错误信息 6 | 7 | def main(stdscr): 8 | curses.start_color() 9 | curses.init_pair(1,curses.COLOR_GREEN,curses.COLOR_BLACK) 10 | 11 | stdscr.addstr(0, 0, "Enter Filename to edit:",curses.color_pair(1)) 12 | curses.echo() 13 | filename = stdscr.getstr(1,0) 14 | stdscr.addstr(2, 0, "Enter text: (hit Ctrl-G to save)",curses.color_pair(1)) 15 | editwin = curses.newwin(22,80,3,0) 16 | stdscr.refresh() 17 | curses.noecho() 18 | 19 | box = Textbox(editwin) 20 | try: 21 | f=open(filename,'rb') 22 | for char in f.read(): 23 | box._insert_printable_char(char) 24 | except FileNotFoundError:pass 25 | 26 | # Let the user edit until Ctrl-G is struck. 27 | box.edit() 28 | 29 | # Get resulting contents 30 | text = box.gather() 31 | try: 32 | f=open(filename,'w') 33 | f.write(text) 34 | f.close() 35 | except OSError: 36 | print("Invalid filename: %r"%str(filename,encoding="utf-8"),file=sys.stderr) 37 | 38 | curses.wrapper(main) 39 | -------------------------------------------------------------------------------- /命令行/readbinfile.py: -------------------------------------------------------------------------------- 1 | #读取二进制文件的程序 2 | import sys,os,colorama 3 | 4 | __email__="3076711200@qq.com" 5 | __author__="七分诚意 qq:3076711200" 6 | __version__="1.0" 7 | 8 | def readbinfile(filename): 9 | "读取一个二进制文件,并打印出该文件的内容。" 10 | f=open(filename,"rb") 11 | while True: 12 | byte=f.read(1) 13 | if not byte:break 14 | #如果该字符为数字或字母 15 | if b'0'<=byte<=b'9' or b'a'<=byte<=b'z' or b'A'<=byte<=b'Z': 16 | #直接打印出这个字符,颜色为绿色 17 | print('%s'%str(byte,encoding="utf-8"),end='') 18 | elif b' '1:filename=sys.argv[1] 25 | else:filename=input("拖曳文件到本窗口,然后按回车:\n") 26 | 27 | if filename.strip(): 28 | os.system("title readbinfile - %s"%filename) #设置命令行窗口标题 29 | readbinfile(filename) 30 | input() 31 | -------------------------------------------------------------------------------- /命令行/readfile.py: -------------------------------------------------------------------------------- 1 | "读取文件的程序" 2 | import sys,os,console_tool 3 | 4 | PROMPT="文件名:" 5 | def read(filename,encoding="utf-8",errors="replace"): 6 | "读取文件,并对文件内容进行编码" 7 | f=open(filename,"rb")#打开文件 8 | return str(f.read(),encoding=encoding,errors="replace") 9 | def _handle(err,console): 10 | "输出错误原因" 11 | console.ctext(err,"red",None,"bold") 12 | 13 | def main(): 14 | c=console_tool.Console()#创建Console(控制台)对象 15 | if len(sys.argv)>1:#如果有系统参数 16 | for arg in sys.argv[1:]: 17 | if not( arg.startswith('/') or arg.startswith('-') ): 18 | try: 19 | print(PROMPT+arg) 20 | #replace作用:清除字符串中的振铃符,防止输出文件内容时发出响铃声 21 | print(read(arg).replace('\x07','')) 22 | print() 23 | except OSError as err:_handle(err) 24 | 25 | while True:#使程序永远循环 26 | try: 27 | filename=input(PROMPT) 28 | if filename.strip(): 29 | content=read(filename).replace('\x07','') 30 | print(content) 31 | if filename[len(filename)-2:len(filename)]=="py": 32 | c.ctext("\n该文件为python脚本,是否执行?(输入:Y/N)", 33 | "blue",None,"bold",end="") 34 | if input().lower()=='y': 35 | returnval=os.system(filename)#执行该文件 36 | if returnval==1:c.ctext("\n执行失败","red",None,"bold") 37 | except OSError as err:#处理错误 38 | if filename.lower()=="quit" or filename.lower()=="q": 39 | c.ctext("Bye!","green") 40 | return 0 41 | _handle(err,c)#输出错误原因 42 | 43 | if __name__=="__main__":sys.exit(main()) 44 | -------------------------------------------------------------------------------- /命令行/执行系统命令.py: -------------------------------------------------------------------------------- 1 | import sys,os 2 | 3 | prompt="命令:" 4 | TITLE="执行系统命令" 5 | 6 | def shell(command): 7 | #忽略异常地执行命令 8 | os.system("title 执行系统命令 - %s"%command) 9 | try:os.system(command)#执行命令 10 | except:pass 11 | os.system("title %s"%TITLE) 12 | 13 | os.system("title %s"%TITLE) #设置命令行窗口标题 14 | if len(sys.argv)>1: 15 | for arg in sys.argv[1:]: 16 | #如果参数不是命令行开关 17 | if not( arg.startswith("-") or arg.startswith("/") ): 18 | print(prompt+arg) 19 | shell(arg) 20 | 21 | while True: #使程序循环 22 | try: 23 | cmd=input(prompt) 24 | if cmd: #如果用户输入了命令 25 | #在命令为exit或quit时退出 26 | if cmd.strip().lower() in ("exit","quit"): 27 | sys.exit() 28 | else:shell(cmd) 29 | except (KeyboardInterrupt,EOFError): 30 | try:print() 31 | except:pass -------------------------------------------------------------------------------- /命令行/数码科技.py: -------------------------------------------------------------------------------- 1 | import sys,os,winsound,random,time 2 | from winsound import PlaySound,SND_LOOP,SND_ASYNC 3 | 4 | DELAY=0.08 5 | def random_print(seq,num=40): 6 | chars='' 7 | for i in range(num): 8 | chars+=random.choice(seq)+' ' 9 | sys.stdout.write(chars) 10 | 11 | def main(): 12 | input("按Enter键开始 ...") 13 | 14 | filename="音乐.wav" 15 | if os.path.isfile(filename): 16 | PlaySound(filename,SND_LOOP+SND_ASYNC) 17 | try: 18 | import console_tool 19 | c=console_tool.Console() 20 | c.colorize(stdout="green") 21 | except ImportError:pass 22 | 23 | seq=open(os.__file__).readlines() 24 | try: 25 | while True: 26 | start=time.perf_counter() 27 | random_print(seq) 28 | cost=time.perf_counter()-start 29 | if cost 2 | 3 | 4 | background 5 | 6 | 7 | 8 | Layer 1 9 | 10 | 11 | 12 | 13 | 100% 14 | 100% 15 | test coverage 16 | test coverage 17 | 18 | 19 | -------------------------------------------------------------------------------- /图标/turtle.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/turtle.ico -------------------------------------------------------------------------------- /图标/写.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/写.ico -------------------------------------------------------------------------------- /图标/加密.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/加密.ico -------------------------------------------------------------------------------- /图标/太阳系.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/太阳系.ico -------------------------------------------------------------------------------- /图标/微笑.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/微笑.ico -------------------------------------------------------------------------------- /图标/微笑2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/微笑2.ico -------------------------------------------------------------------------------- /图标/房子.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/房子.ico -------------------------------------------------------------------------------- /图标/数字.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/数字.ico -------------------------------------------------------------------------------- /图标/文件.ICO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/文件.ICO -------------------------------------------------------------------------------- /图标/棋子.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/棋子.ico -------------------------------------------------------------------------------- /图标/浏览器.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/浏览器.ico -------------------------------------------------------------------------------- /图标/猜.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/猜.ico -------------------------------------------------------------------------------- /图标/窗口.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/窗口.ico -------------------------------------------------------------------------------- /图标/铃.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/铃.ico -------------------------------------------------------------------------------- /图标/音乐.ICO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/音乐.ICO -------------------------------------------------------------------------------- /图标/香蕉.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/图标/香蕉.ico -------------------------------------------------------------------------------- /小项目/AI/LTP语法分析.py: -------------------------------------------------------------------------------- 1 | from ltp import LTP 2 | import torch 3 | # 初始化LTP 4 | print("初始化 LTP") 5 | ltp = LTP("LTP/tiny") 6 | 7 | # 将模型移动到 GPU 上 8 | if torch.cuda.is_available(): 9 | print("GPU 加速可用") 10 | # ltp.cuda() 11 | ltp.to("cuda") 12 | else: 13 | print("GPU 加速不可用") 14 | 15 | while True: 16 | str=input("输入文字:").strip() 17 | if not str:continue 18 | if str.lower() in ("exit","quit"):break 19 | result = ltp.pipeline([str], tasks = ["cws","pos","ner","srl","dep","sdp","sdpg"]) 20 | print("分词:") 21 | print(result.cws) 22 | print("词性标注:") 23 | print(result.pos) 24 | print("命名实体识别:") 25 | print(result.ner) 26 | print("语义角色标注:") 27 | print(result.srl) 28 | print("依存句法分析:") 29 | print(result.dep) 30 | print("语义依存分析(树):") 31 | print(result.sdp) 32 | print("语义依存分析(图):") 33 | print(result.sdpg) 34 | -------------------------------------------------------------------------------- /小项目/AI/Q-Learning.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | # 定义环境 4 | R = [[-1, -1, -1, -1, 0, -1], 5 | [-1, -1, -1, 0, -1, 100], 6 | [-1, -1, -1, 0, -1, -1], 7 | [-1, 0, 0, -1, 0, -1], 8 | [0, -1, -1, 0, -1, 100], 9 | [-1, 0, -1, -1, 0, 100]] 10 | 11 | # 初始化 Q 表 12 | Q = [[0 for _ in range(6)] for _ in range(6)] 13 | 14 | # 定义参数 15 | gamma = 0.8 16 | alpha = 0.1 17 | num_episodes = 1000 18 | 19 | # Q-learning 算法 20 | for _ in range(num_episodes): 21 | state = random.randint(0, 5) 22 | while True: 23 | # 获取当前状态下可选的动作 24 | possible_actions = [i for i in range(6) if R[state][i] >= 0] 25 | # 随机选择一个动作 26 | action = random.choice(possible_actions) 27 | next_state = action 28 | # 获取下一个状态下可选的动作 29 | next_possible_actions = [i for i in range(6) if R[next_state][i] >= 0] 30 | # 更新 Q 表 31 | Q[state][action] += alpha * (R[state][action] + gamma * max([Q[next_state][a] for a in next_possible_actions]) - Q[state][action]) 32 | state = next_state 33 | if state == 5: 34 | break 35 | 36 | print("Q-table:") 37 | for row in Q: 38 | print(row) 39 | 40 | # 测试 41 | state = 2;actions = 0 42 | while state != 5 and actions < 20: 43 | print("当前状态:", state) 44 | # 选择具有最大 Q 值的动作 45 | action = max(enumerate(Q[state]), key=lambda x: x[1])[0] 46 | print("采取的动作:", action) 47 | state = action 48 | actions += 1 49 | if state == 5: 50 | print("到达终点!") 51 | else: 52 | print("测试失败!") -------------------------------------------------------------------------------- /小项目/AI/README.txt: -------------------------------------------------------------------------------- 1 | 本文件夹中为来自其他人或网络的AI程序。 -------------------------------------------------------------------------------- /小项目/AI/StanfordNLP.py: -------------------------------------------------------------------------------- 1 | import stanza,os 2 | 3 | path=os.path.join(os.path.split(__file__)[0],"stanza_resources") 4 | langs=["en","zh-hans"] 5 | # 下载中、英文模型 6 | if not os.path.isdir(path): 7 | for lang in langs: 8 | stanza.download(lang, model_dir=path) 9 | 10 | lang=langs[int(input("输入语言序号 (" + ", ".join( 11 | "%d:%s"%(i,langs[i]) for i in range(len(langs))) + "): "))] 12 | # 加载模型 13 | nlp = stanza.Pipeline(lang,processors="tokenize,pos,lemma,depparse", 14 | download_method=None,dir=path) # 禁用检查更新 15 | 16 | while True: 17 | sentence = input("输入文本:") # 输入句子 18 | if sentence.lower() in ("exit","quit"):break 19 | 20 | # 处理句子 21 | doc = nlp(sentence) 22 | 23 | # 获取词性标注和句法分析结果 24 | for sentence in doc.sentences: 25 | print("\n句法分析结果:") 26 | for word in sentence.words: 27 | print("%d:"%word.id, word.text, 28 | "词性:", word.pos, "依存:", 29 | sentence.words[word.head-1].text, # id是从1开始而不是从0 30 | "依存关系类型:",word.deprel) -------------------------------------------------------------------------------- /小项目/AI/codebert.py: -------------------------------------------------------------------------------- 1 | import os,pprint,traceback 2 | from transformers import RobertaConfig, RobertaTokenizer, RobertaForMaskedLM, pipeline 3 | 4 | MODEL_NAME = "microsoft/codebert-base-mlm" 5 | 6 | print(f"Loading {MODEL_NAME}") 7 | model = RobertaForMaskedLM.from_pretrained(MODEL_NAME) 8 | tokenizer = RobertaTokenizer.from_pretrained(MODEL_NAME) 9 | 10 | if not os.path.isdir(MODEL_NAME): 11 | model.save_pretrained(MODEL_NAME) 12 | tokenizer.save_pretrained(MODEL_NAME) 13 | 14 | 15 | while True: 16 | code = input("输入代码 (空缺以表示): ").strip() 17 | if not code:continue 18 | try: 19 | fill_mask = pipeline('fill-mask', model=model, tokenizer=tokenizer) 20 | outputs = fill_mask(code) 21 | pprint.pprint(outputs) 22 | except Exception: 23 | traceback.print_exc() 24 | -------------------------------------------------------------------------------- /小项目/AI/data/digits.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/AI/data/digits.h5 -------------------------------------------------------------------------------- /小项目/AI/data/judge_lang.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/AI/data/judge_lang.pkl -------------------------------------------------------------------------------- /小项目/AI/data/judge_lang_raw.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/AI/data/judge_lang_raw.pkl -------------------------------------------------------------------------------- /小项目/AI/data/judge_lang_tiny.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/AI/data/judge_lang_tiny.pkl -------------------------------------------------------------------------------- /小项目/AI/data/judge_lang_tune.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/AI/data/judge_lang_tune.pkl -------------------------------------------------------------------------------- /小项目/AI/gpt_2.py: -------------------------------------------------------------------------------- 1 | import sys,os,io 2 | import gpt_2_simple as gpt2 3 | 4 | # 模型可以是"124M"、"355M"、"774M"等 5 | model = "124M" 6 | if not os.path.isdir(os.path.join("models",model)): 7 | # 下载124M模型 8 | print("下载模型 %s..." % model) 9 | gpt2.download_gpt2(model_name=model) 10 | else:print("模型 %s 已下载" % model) 11 | 12 | # 加载模型 13 | sess = gpt2.start_tf_sess() 14 | gpt2.load_gpt2(sess, model_name=model) 15 | 16 | # gpt.generate的参数:generate(sess, run_name='run1', checkpoint_dir='checkpoint', model_name=None, model_dir='models', sample_dir='samples', return_as_list=False, truncate=None, destination_path=None, sample_delim='====================\n', prefix=None, seed=None, nsamples=1, batch_size=1, length=1023, temperature=0.7, top_k=0, top_p=0.0, include_prefix=True) 17 | 18 | old_stdout=sys.stdout # 修改sys.stdout,由于gpt2.generate函数会直接打印出文本 19 | # 输入前缀(如:once upon a time),生成文本 20 | prefix = input("输入前缀:") 21 | while prefix.lower() not in ("exit","quit"): 22 | sys.stdout = io.StringIO() 23 | gpt2.generate(sess, model_name=model, prefix=prefix, 24 | length=250) 25 | sys.stdout.seek(0) 26 | text = sys.stdout.read() 27 | 28 | sys.stdout=old_stdout 29 | print(text) 30 | prefix = input("输入前缀:") 31 | 32 | gpt2.reset_session(sess) # 关闭会话 -------------------------------------------------------------------------------- /小项目/AI/感知器.py: -------------------------------------------------------------------------------- 1 | class Perceptron: 2 | def __init__(self,learning_rate=0.01,iterations=10): 3 | self.lr=learning_rate 4 | self.iterations=iterations 5 | self.w=0 6 | self.bias=0 # 最早假设经过0,0 7 | def fit(self,X,Y): 8 | for _ in range(self.iterations): 9 | for i in range(len(X)): 10 | x=X[i];y=Y[i] 11 | self.w+=self.lr*(y-self.predict(x))*x 12 | self.bias+=self.lr*(y-self.predict(x)) 13 | print("w=",self.w,",bias=",self.bias) 14 | def net_input(self,x): 15 | return self.w*x+self.bias 16 | def predict(self,x): 17 | #return 1 if self.net_input(x)>0 else 0 18 | return self.net_input(x) 19 | 20 | x=[2] 21 | y=[1] 22 | 23 | model=Perceptron(0.01,100) 24 | model.fit(x,y) 25 | 26 | test_x=[2,3,-1] 27 | for x in test_x: 28 | print(x,model.predict(x)) 29 | 30 | print("w=",model.w,",bias=",model.bias) -------------------------------------------------------------------------------- /小项目/AI/线性回归.py: -------------------------------------------------------------------------------- 1 | class LinearRegression: 2 | def __init__(self,eta=0.01,iterations=10): 3 | self.lr=eta 4 | self.iterations=iterations 5 | self.w=0 6 | self.bias=0 7 | def cost_func(self,X,Y,weight,bias):#损失函数 8 | n=len(X) 9 | total_error=0 10 | for i in range(n): 11 | total_error+=(Y[i]-(weight*X[i]+bias))**2 12 | return total_error / n 13 | def fit(self,X,Y): 14 | n = len(X) 15 | for cnt in range(self.iterations): 16 | dw=0;db=0 17 | # 调整w和bias 18 | for i in range(n): 19 | dw += -2 * X[i] * (Y[i]-(self.w*X[i]+self.bias)) 20 | db += -2 * (Y[i] - (self.w*X[i]+self.bias)) 21 | self.w -= dw / n * self.lr 22 | self.bias -= db / n *self.lr 23 | 24 | if cnt%10==0: 25 | cost=self.cost_func(X,Y,self.w,self.bias) 26 | print("w=",self.w,",bias=",self.bias, 27 | ",cost:",cost,"次数:",cnt+1) 28 | def predict(self,x): # 激活函数(这里直接是输入) 29 | return self.w*x+self.bias 30 | 31 | x=[1,2,3,4,5,0,-1,-10] 32 | y=[0,1,2,3,4,-1,-2,-11] 33 | 34 | model=LinearRegression(0.02,500) 35 | model.fit(x,y) 36 | 37 | test_x=[2,3,-1] 38 | for x in test_x: 39 | print(x,model.predict(x)) 40 | 41 | print("w=",model.w,",bias=",model.bias) -------------------------------------------------------------------------------- /小项目/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者使用Python开发的小项目, 分为算法设计类(在本目录)、tkinter、面向对象、文件处理、性能等。 2 | 程序大多比较短小精湛, 适合Python初学者阅读和学习。 -------------------------------------------------------------------------------- /小项目/tkinter/tk透明效果.pyw: -------------------------------------------------------------------------------- 1 | import tkinter as tk 2 | import tkinter.messagebox as msgbox 3 | from PIL import Image,ImageTk 4 | 5 | COLOR='#f0f0f0' # 设置这个颜色值可隐藏canvas边框 6 | 7 | root=tk.Tk() 8 | root.wm_attributes('-transparentcolor', COLOR) 9 | root["bg"]=COLOR 10 | root.title("透明窗体") 11 | root.overrideredirect(True) 12 | #root.attributes("-alpha",0.5) 13 | 14 | cv=tk.Canvas(root) 15 | cv.pack(expand=True,fill=tk.BOTH) 16 | cv["bg"]=COLOR 17 | pic=Image.open("图标\\snake.ico","r").resize((100,100)) 18 | imtk=ImageTk.PhotoImage(pic) 19 | x,y=250,200 20 | root.geometry('%dx%d+%d+%d'%(pic.width,pic.height,x,y)) 21 | cv.create_image(0,0,image=imtk,anchor=tk.NW) 22 | 23 | msgbox.showinfo("","点击图标, 再按Alt+F4键关闭。",master=root) 24 | root.focus_force() 25 | root.mainloop() 26 | -------------------------------------------------------------------------------- /小项目/turtle/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者早期使用turtle模块写的程序。 -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/catch_turtle/README.txt -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/__init__.py: -------------------------------------------------------------------------------- 1 | """使用turtle模块制作的一款游戏。 2 | 游戏玩法:在命令行中输入py -m catch_turtle, 3 | 这将弹出一个窗口; 点击"开始游戏"按钮,开始游戏。 4 | 5 | 按↑,↓,←,→键移动玩家,使其触碰被追逐者。触碰即追逐成功,一次得10分, 6 | 追逐时,请小心红色的"敌人",触碰"敌人"即追逐失败。 7 | 触碰后,被追逐者将会回到原位。每得到40分升一级。 8 | 游戏结束后上一次的等级、最高分将会被保存,但分数不会保存,失败后分数清零。 9 | """ 10 | import sys 11 | 12 | __email__="3076711200@qq.com" 13 | __author__="七分诚意 qq:3076711200" 14 | __version__="1.1.3" 15 | 16 | try: 17 | try: import catch_turtle.catch_turtle as catch_turtle 18 | except ImportError: import catch_turtle 19 | except ImportError as err: 20 | message="错误:找不到游戏核心模块: %s"%err.name 21 | print(message,file=sys.stderr) 22 | 23 | #相当于from xxmodule import * 24 | scope=globals() 25 | for attr in dir(catch_turtle): 26 | if not attr.startswith('_'): 27 | obj=getattr(catch_turtle,attr) 28 | #过滤turtle模块中的函数 29 | if not getattr(obj,"__module__",None)=="turtle": 30 | scope[attr]=obj 31 | 32 | if __name__=='__main__':start() 33 | -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/__main__.py: -------------------------------------------------------------------------------- 1 | try: import catch_turtle.catch_turtle as catch_turtle 2 | except ImportError: import catch_turtle 3 | 4 | if __name__=='__main__': 5 | catch_turtle.start() -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/cfg.cfg: -------------------------------------------------------------------------------- 1 | e:0b1010 2 | cs:0b11001 3 | ps:0b10100 4 | dc:0b111111 5 | a:0b1 6 | s:0b0 7 | l:0b0 8 | spl:0b101000 9 | -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/图片/草地.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/catch_turtle/图片/草地.gif -------------------------------------------------------------------------------- /小项目/turtle/catch_turtle/图片/草地2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/catch_turtle/图片/草地2.gif -------------------------------------------------------------------------------- /小项目/turtle/shapes/ellipse.py: -------------------------------------------------------------------------------- 1 | import math,turtle 2 | def ellipse(a,b,angle,steps): 3 | minAngle = (2*math.pi/360) * angle / steps 4 | turtle.penup() 5 | turtle.setpos(0,-b) 6 | turtle.pendown() 7 | for i in range(steps): 8 | nextPoint = [a*math.sin((i+1)*minAngle),-b*math.cos((i+1)*minAngle)] 9 | turtle.setpos(nextPoint) 10 | 11 | if __name__=="__main__": 12 | ellipse(200,100,360,30) 13 | turtle.done() -------------------------------------------------------------------------------- /小项目/turtle/shapes/pdf.py: -------------------------------------------------------------------------------- 1 | from reportlab.graphics.shapes import Drawing,PolyLine 2 | from reportlab.graphics import renderPDF 3 | from turtle import * 4 | import house 5 | 6 | delay(0) 7 | penup() 8 | goto(400,300) 9 | begin_poly() 10 | house.draw(60) 11 | end_poly() 12 | d=Drawing(window_width(),window_height()) 13 | s=get_poly() 14 | print(s) 15 | p=PolyLine(s) 16 | d.add(p) 17 | 18 | renderPDF.drawToFile(d, '房子.pdf') 19 | -------------------------------------------------------------------------------- /小项目/turtle/shapes/多边形.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/shapes/多边形.txt -------------------------------------------------------------------------------- /小项目/turtle/shapes/按角度画图.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | from turtle import * 3 | import 画多边形 4 | 5 | scr=getscreen() 6 | color=scr.textinput("输入颜色","输入图形颜色(选填):") 7 | if color:画多边形.trans(color,False) 8 | 9 | shape("turtle") 10 | penup() 11 | back(100) 12 | pendown() 13 | while True:#使程序永远循环 14 | length=scr.numinput("","移动的距离(单位:像素):") 15 | angle=scr.numinput("","角度:") 16 | times=scr.numinput("","循环次数:") 17 | x=1 18 | dot(4,"red")#在起点画红色圆点 19 | while x<=times: #循环,直到画出所有的边 20 | forward(length) 21 | right(angle) 22 | x+=1 23 | dot(2,"blue")#在终点画蓝色圆点 -------------------------------------------------------------------------------- /小项目/turtle/shapes/画多边形.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | from turtle import * 3 | # 表示颜色值的字典 4 | color_list={"红色":"red","橙色":"orange","黄色":"yellow","绿色":"green","蓝色":"blue","紫色":"purple","粉色":"purple","黑色":"black","白色":"white","褐色":"brown","棕色":"brown","灰色":"gray"} 5 | 6 | def trans(color,fill): 7 | "设置turtle画笔,或填充颜色" 8 | if color!="": 9 | if color in color_list.keys(): 10 | color=color_list[color]#获取字典中的颜色值 11 | else: 12 | try: 13 | color=color_list[color+"色"] 14 | except:pass#错误处理 15 | if fill==True:fillcolor(color)#判断是否设置填充颜色 16 | else:pencolor(color)#设置画笔颜色 17 | 18 | def main(): 19 | title("多边形")#设置窗口标题 20 | shape("turtle") 21 | penup() 22 | back(100) 23 | getscreen().colormode(255) 24 | fillcolor(212,212,212) #设置"海龟"颜色 25 | 26 | scr=getscreen() 27 | while True:#使程序永远循环 28 | color=scr.textinput("","输入图形颜色(选填):") 29 | if color:trans(color,fill=True) 30 | bian=int(input("输入边数:")) 31 | length=int(input("边长(单位:像素):")) 32 | x=1 33 | pendown() #开始画图 34 | begin_fill() 35 | while x<=bian: #循环,直到画出所有的边 36 | forward(length)#画多边形 37 | right(360/bian) 38 | x+=1 39 | end_fill() 40 | penup() 41 | forward(length*bian/2.1) 42 | 43 | if __name__=="__main__":main() 44 | -------------------------------------------------------------------------------- /小项目/turtle/shapes/画多边形_old.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from turtle import * 3 | # 表示颜色值的字典 4 | color_list={"红色":"red","橙色":"orange","黄色":"yellow","绿色":"green","蓝色":"blue","紫色":"purple","粉色":"purple","黑色":"black","白色":"white","褐色":"brown","棕色":"brown","灰色":"gray"} 5 | 6 | def trans(color,fill): 7 | "设置turtle画笔,或填充颜色" 8 | if color!="": 9 | if color in color_list.keys(): 10 | color=color_list[color]#获取字典中的颜色值 11 | else: 12 | try: 13 | color=color_list[color+"色"] 14 | except:pass#错误处理 15 | if fill==True:fillcolor(color)#判断是否设置填充颜色 16 | else:pencolor(color)#设置画笔颜色 17 | 18 | def main(): 19 | if len(sys.argv)>1: 20 | try: 21 | sys.stdin=open(sys.argv[1]) 22 | except OSError as err:print(err,file=sys.stderr) 23 | title("多边形")#设置窗口标题 24 | shape("turtle") 25 | penup() 26 | back(100) 27 | getscreen().colormode(255) 28 | fillcolor(212,212,212) #设置"海龟"颜色 29 | 30 | scr=getscreen() 31 | while True:#使程序永远循环 32 | color=input("输入图形颜色(选填):") 33 | if color:trans(color,fill=True) 34 | bian=int(input("输入边数:")) 35 | length=int(input("边长(单位:像素):")) 36 | x=1 37 | pendown() #开始画图 38 | begin_fill() 39 | while x<=bian: #循环,直到画出所有的边 40 | forward(length)#画多边形 41 | right(360/bian) 42 | x+=1 43 | end_fill() 44 | penup() 45 | forward(length*bian/2.1) 46 | 47 | if __name__=="__main__":main() 48 | -------------------------------------------------------------------------------- /小项目/turtle/shapes/绘制星形1.py: -------------------------------------------------------------------------------- 1 | from turtle import * 2 | import 画多边形 3 | 4 | title("多边形")#设置窗口标题 5 | penup() 6 | back(100) 7 | shape("turtle") 8 | colormode(255) 9 | pencolor(120,120,120) #设置"海龟"颜色 10 | 11 | scr=getscreen() 12 | while True:#使程序永远循环 13 | color=scr.textinput("","输入图形颜色(选填):") 14 | if color:画多边形.trans(color,True) 15 | a=scr.numinput("","角的个数(必须为奇数):") 16 | length=scr.numinput("","尺寸(单位:像素):") 17 | pendown() #开始画图 18 | begin_fill() 19 | for n in range(a): 20 | forward(length) 21 | right(180-180/a) 22 | end_fill() 23 | penup() 24 | forward(length*1.3) 25 | -------------------------------------------------------------------------------- /小项目/turtle/shapes/绘制星形2.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | from turtle import * 3 | import 画多边形 4 | 5 | title("多边形")#设置窗口标题 6 | penup() 7 | back(100) 8 | shape("turtle") 9 | colormode(255) 10 | pencolor(120,120,120) #设置"海龟"颜色 11 | fillcolor("yellow") 12 | 13 | scr=getscreen() 14 | while True:#使程序永远循环 15 | color=scr.textinput("","输入图形颜色(选填):") 16 | if color:画多边形.trans(color,True) 17 | a=scr.numinput("","角的个数(必须为奇数):") 18 | length=scr.numinput("","尺寸(单位:像素):") 19 | pendown() #开始画图 20 | begin_fill() 21 | for n in range(a): 22 | forward(length) 23 | right(180-180/a) 24 | forward(length) 25 | left(90-(180/a)/2) 26 | end_fill() 27 | penup() 28 | forward(length*1.3) -------------------------------------------------------------------------------- /小项目/turtle/timer.py: -------------------------------------------------------------------------------- 1 | "一个计时器模块,其中包含Timer类。" 2 | import time 3 | 4 | class Timer: 5 | def __init__(self): 6 | self.start() 7 | def start(self): 8 | "开始计时" 9 | self.time=time.time() 10 | def gettime(self): 11 | "获取从计时开始之后的时间" 12 | return time.time()-self.time 13 | def printtime(self): 14 | print("用时:",self.gettime(),"秒") 15 | 16 | def test(): 17 | print("------开始-----") 18 | print("每次执行循环1000000次,共20次:") 19 | t=Timer() 20 | total=Timer() 21 | for times in range(1,21): 22 | for n in range(1000000):pass 23 | print("第",times,"次用时:",t.gettime(),"秒") 24 | t.start() 25 | print("总用时:",total.gettime(),"秒",end="") 26 | 27 | if __name__=="__main__": 28 | test() 29 | input() -------------------------------------------------------------------------------- /小项目/turtle/turtledemo.py: -------------------------------------------------------------------------------- 1 | import sys,os 2 | def find_dir(): 3 | for path in sys.path: 4 | if path.lower().endswith("lib"):return path 5 | 6 | print("Starting turtledemo...") 7 | path=find_dir()+r'\turtledemo\__main__.py' 8 | print(path) 9 | os.system("py "+path) 10 | -------------------------------------------------------------------------------- /小项目/turtle/图片/岩壁.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/图片/岩壁.gif -------------------------------------------------------------------------------- /小项目/turtle/图片/草地.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/图片/草地.gif -------------------------------------------------------------------------------- /小项目/turtle/图片/草地2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/图片/草地2.gif -------------------------------------------------------------------------------- /小项目/turtle/图片/雨天.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/turtle/图片/雨天.gif -------------------------------------------------------------------------------- /小项目/turtle/拖曳.py: -------------------------------------------------------------------------------- 1 | from turtle import * 2 | 3 | def move(x, y): 4 | # 海龟箭头移动到当前拖动位置 5 | global n 6 | goto(x,y) 7 | n+=1 8 | print("拖动次数:",n," x:",x,"y:",y) 9 | 10 | def release(x,y): 11 | pendown() 12 | print('鼠标释放 位置'," x:",x,"y:",y) 13 | 14 | #绘制文本 15 | delay(0) 16 | penup() 17 | goto(-40,150) 18 | write("DRAG!",font=("黑体",30)) 19 | home()#移动到0,0位置 20 | shape("turtle") 21 | onrelease(release) 22 | ondrag(move,btn=1) 23 | n=1 #n:拖动次数 24 | 25 | mainloop()#使程序不立即关闭 -------------------------------------------------------------------------------- /小项目/turtle/洞中流水.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | from turtle import * 3 | import random 4 | from random import random 5 | import os 6 | 7 | def draw(x,y): 8 | '画一个"雨点"' 9 | goto(x,y) 10 | dot(5,"white") 11 | 12 | def _undo(times): 13 | for i in range(times): 14 | if undobufferentries(): 15 | undo() 16 | 17 | scr=Screen() 18 | title("洞中流水")#设置窗口标题 19 | turtle.setup(width=700, height=800)#设置画图窗口大小 20 | scr.bgcolor("black")#设置背景颜色 21 | app_path=os.path.split(__file__)[0]#获取程序路径 22 | scr.bgpic(app_path+"/图片/岩壁.gif")#加载图片 23 | penup() 24 | hideturtle()#隐藏画笔 25 | 26 | #声明两个新列表,用于记录水滴坐标 27 | x=[0]*4 28 | y=[0]*4 29 | while True: 30 | #随机选择"水滴"开始流下的坐标 31 | speed(0) 32 | for n in range(4): 33 | x[n]=random()*600-300 34 | y[n]=random()*250+100 35 | i=0 36 | while i<30: 37 | for n in range(4): 38 | y[n]-=11 39 | draw(x[n],y[n]) 40 | i+=1 41 | tracer(30,0) 42 | _undo(3)#撤销 43 | penup() 44 | tracer(1,1) 45 | -------------------------------------------------------------------------------- /小项目/turtle/画圆.py: -------------------------------------------------------------------------------- 1 | import turtle 2 | import time 3 | #画一个蓝色点 4 | turtle.dot(6,"blue") 5 | #设置画笔颜色为绿色 6 | turtle.pencolor("green") 7 | # 当前位置(0,0)开始逆时针画半径为30的圆 8 | turtle.circle(30) 9 | # 逆时针画半径为50的半圆 10 | turtle.circle(50, 180) 11 | # 方向值为180,“standard”模式时方向向左,“logo”模式方向向下 12 | turtle.circle(-50, 180) 13 | #暂停程序 14 | time.sleep(0.2) 15 | #设置画笔颜色为蓝色 16 | turtle.pencolor("purple") 17 | # 逆时针方向半径为40画五边形(5步画接近整圆的图形) 18 | turtle.circle(40, None, 5) 19 | #画一个红点 20 | turtle.dot(6,"red") 21 | #让程序暂停,不立即关闭 22 | time.sleep(2) -------------------------------------------------------------------------------- /小项目/turtle/网格2.py: -------------------------------------------------------------------------------- 1 | import time,sys,tkinter 2 | from turtle import * 3 | 4 | #定义常量 5 | UP=90 6 | DOWN=-90 7 | LEFT=180 8 | RIGHT=0 9 | CLOCKWISE=[UP,RIGHT,DOWN,LEFT] 10 | ANTICLOCKWISE=[UP,LEFT,DOWN,RIGHT] 11 | 12 | def draw_square(size): 13 | for n in range(4): 14 | forward(size) 15 | right(90) 16 | 17 | class Square(Turtle): 18 | def __init__(self,size=25, 19 | direction=RIGHT, 20 | color="white"): 21 | super().__init__() 22 | self.size=size 23 | self.direction=direction 24 | self.fillcolor(color) 25 | 26 | begin_poly()# 开始记录正方形形状 27 | draw_square(self.size) 28 | end_poly()# 结束记录 29 | poly=get_poly() 30 | register_shape("square", poly) 31 | self.shape("square")#将自身的形状设置为记录的形状 32 | hideturtle()#隐藏默认的海龟 33 | 34 | class Grid(Square): 35 | def __init__(self,size=25, 36 | direction=CLOCKWISE, 37 | color="white", 38 | fast=False): 39 | super().__init__(size,direction,color) 40 | self.direction=direction 41 | self.count=1.5 42 | self.fast=fast 43 | if fast:tracer(False) 44 | 45 | def draw(self): 46 | for direc in self.direction: 47 | self.setheading(direc) 48 | self.forward(self.size*int(self.count)) 49 | self.stamp()#拷贝一份自身的形状,即绘制正方形 50 | self.count+=0.5 51 | if self.fast: 52 | update() 53 | 54 | def main(): 55 | shape("triangle") 56 | fillcolor("green") 57 | g=Grid(color="brown",fast=("--fast" in sys.argv)) 58 | delay(0) 59 | while True: 60 | g.draw() 61 | 62 | if __name__=="__main__": 63 | try:main() 64 | except (Terminator,tkinter.TclError):pass -------------------------------------------------------------------------------- /小项目/其他/clock.py: -------------------------------------------------------------------------------- 1 | "整点报时程序。" 2 | import winsound,math,time 3 | 4 | DELAY=0.2 #间隔时间(秒) 5 | def bell(times): 6 | "调用winsound.Beep函数响铃(次数为times)。" 7 | for i in range(times): 8 | winsound.Beep(int(600*math.sin(i/6.28)+700),500) 9 | time.sleep(0.5) 10 | 11 | def main(): 12 | while True: 13 | t=time.localtime() 14 | hour,minute,second=str(t[3]).zfill(2),\ 15 | str(t[4]).zfill(2),\ 16 | str(t[5]).zfill(2) 17 | print("{}:{}:{}".format(hour,minute,second)) 18 | #当前时间为整点时报时 19 | if minute=="00" and second=="00": 20 | bell(t[3]%12) 21 | time.sleep(DELAY) 22 | 23 | if __name__=="__main__":main() 24 | -------------------------------------------------------------------------------- /小项目/其他/字符编码.py: -------------------------------------------------------------------------------- 1 | "将字符转换为字符编码。" 2 | while True: 3 | n=input("输入字符:") 4 | if len(n)==1:print(hex(ord(n))) 5 | else: 6 | for i in range(len(n)): 7 | print(hex(ord(n[i]))+"\t",end='')#逐个显示字符的编码 8 | print() 9 | -------------------------------------------------------------------------------- /小项目/其他/字符编码写测试.py: -------------------------------------------------------------------------------- 1 | import sys,os,encodings 2 | 3 | def writesymbols(filename,encoding='utf-8'): 4 | f=open(filename,'wb') 5 | try: 6 | for i in range(0x110000): 7 | f.write(bytes(chr(i),encoding=encoding,errors="replace")) 8 | except LookupError:pass 9 | # except UnicodeEncodeError:pass 10 | finally:f.close() 11 | 12 | def main(): 13 | try: 14 | os.mkdir("%s\symbols"%sys.path[0]) 15 | except FileExistsError:pass 16 | if len(sys.argv)==2: 17 | filename="%s\symbols\symbol_%s.txt"%(sys.path[0],sys.argv[1]) 18 | print("writing:%s"%filename) 19 | writesymbols(filename,encoding=sys.argv[1]) 20 | else: 21 | codings = [] 22 | for coding in ["utf-8"]+list(encodings.aliases.aliases.values()): 23 | if coding in codings:continue 24 | filename="%s\symbols\symbol_%s.txt"%(sys.path[0],coding) 25 | print("writing:%s"%filename) 26 | writesymbols(filename,encoding=coding) 27 | codings.append(coding) 28 | 29 | if __name__=="__main__":main() -------------------------------------------------------------------------------- /小项目/其他/字符解码.py: -------------------------------------------------------------------------------- 1 | "将字符编码转换为字符。" 2 | while True: 3 | n=str(input("输入字符的编码:")) 4 | l=n.split() 5 | for n in l: 6 | try:print(chr(eval("0x"+n)),end="")#逐个显示字符的编码 7 | except Exception as err:print(type(err).__name__,':',err) 8 | print() 9 | -------------------------------------------------------------------------------- /小项目/其他/无限输出.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from random import randrange 3 | 4 | def print(quiet=False,max=55296,file=sys.stdout): 5 | str="" 6 | for n in range(50): 7 | #每次输出一行 8 | char=chr(randrange(0,max)) # 生成随机字符 9 | if not char=='\x07' or not quiet:str+=char 10 | file.write(str) 11 | def print_asciis(quiet=True): 12 | print(quiet=quiet,max=128) 13 | def main(): 14 | try: 15 | import colorama 16 | colorama.init() 17 | except ImportError:pass 18 | input("按Enter键开始无限输出 ...") 19 | while True:print(quiet=True) 20 | 21 | if __name__=="__main__":main() 22 | -------------------------------------------------------------------------------- /小项目/其他/无限输出2.py: -------------------------------------------------------------------------------- 1 | from time import sleep 2 | from random import choice 3 | import colorama 4 | colorama.init() 5 | 6 | input("按Enter键开始无限输出 ...") 7 | # 这样会使输出的文字随机变换颜色 8 | charlist=["\033","[","m"]+[str(i) for i in range(1,10)]+[' ']*3 9 | #charlist=[chr(i) for i in range()] 10 | #charlist.remove('\a') # 去除振铃符号 11 | while True: 12 | str="" 13 | for n in range(100): 14 | #每次输出一行 15 | char=choice(charlist) # 从charlist中选择一个随机字符 16 | str+=char 17 | print(str,end="") 18 | sleep(0.004) 19 | -------------------------------------------------------------------------------- /小项目/其他/解压zip文件.py: -------------------------------------------------------------------------------- 1 | import os,zipfile,sys 2 | 3 | for file in os.listdir("."): 4 | if file.endswith(".zip"): 5 | z=zipfile.ZipFile(file) 6 | print(file) 7 | character="" 8 | for s in z.namelist(): 9 | try: 10 | # 可能还需要修改zipfile模块源代码的对应部分 11 | s=s.encode("cp437").decode("gbk") 12 | except Exception: 13 | try:s=s.encode("cp437").decode("utf-8") 14 | except Exception:pass 15 | if s.endswith(".pmx"): 16 | character=s[:-4] 17 | print(character,file) 18 | if character and "/" not in character: 19 | try: 20 | os.mkdir(character) 21 | z.extractall(character) 22 | except FileExistsError: 23 | print(character,file,"已存在") 24 | -------------------------------------------------------------------------------- /小项目/其他/计算数字位数.py: -------------------------------------------------------------------------------- 1 | import sys,math 2 | while True: 3 | try: 4 | result=input("输入一个数:") 5 | n=abs(float(result)) 6 | except ValueError: 7 | if result.strip(): 8 | print("%r is not a number.Try again."%result,file=sys.stderr) 9 | continue 10 | if n==0: 11 | w=1 12 | else: 13 | w=math.floor(math.log10(n)+1)#计算位数 14 | if w<=0:w=-w+2 15 | print("位数:"+str(w)) 16 | -------------------------------------------------------------------------------- /小项目/其他/计算质数.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def prime(num): 4 | if num<=0: 5 | raise ValueError("数值必须大于0") 6 | elif num==1: 7 | return False # 1既不是质数也不是合数 8 | for i in range(2,int(math.sqrt(num))+1): 9 | if num%i==0: 10 | return False 11 | 12 | return True 13 | 14 | num=int(input("输入数: ")) 15 | print(("%s是质数" if prime(num) else "%d不是质数") % num) -------------------------------------------------------------------------------- /小项目/其他/输出三角形.py: -------------------------------------------------------------------------------- 1 | import time 2 | try: 3 | import console 4 | c=console.Console() 5 | except:c=None 6 | 7 | def triangle(char,height,delay=0,color="green",*args,**kwargs): 8 | for n in range(1,height*2,2): 9 | line=" "*((height*2-n)//2)*len(char)+char*n 10 | if c:c.ctext(line,color,*args,**kwargs) 11 | else:print(line) 12 | time.sleep(delay) 13 | 14 | def main(): 15 | while True: 16 | char=input("三角形的组成字符:") 17 | if not char:break 18 | height=int(input("三角形的高:")) 19 | triangle(char,height,delay=0.02) 20 | 21 | if __name__=="__main__":main() 22 | -------------------------------------------------------------------------------- /小项目/图像处理/pil旋转.py: -------------------------------------------------------------------------------- 1 | #import numpy as np 2 | from tkinter import * 3 | from PIL import Image,ImageTk 4 | 5 | angle = 0 6 | def animate(): 7 | global imtk,angle,id 8 | angle += 10 9 | image=old.rotate(angle) 10 | imtk=ImageTk.PhotoImage(image) 11 | cv.delete(id) 12 | id=cv.create_image(100,100,image=imtk) #,anchor = 'nw') 13 | cv.after(20,animate) 14 | 15 | root=Tk() 16 | cv=Canvas(root,bg='black') 17 | cv.pack(side=TOP,expand=True,fill=BOTH) 18 | old=Image.open("..\\..\\图标\\blackhole.jpg","r").resize((100,100)) 19 | imtk=ImageTk.PhotoImage(old) 20 | id=cv.create_image(100,100,image=imtk) 21 | cv.after(20,animate) 22 | 23 | root.mainloop() 24 | -------------------------------------------------------------------------------- /小项目/图像处理/pil旋转特效.py: -------------------------------------------------------------------------------- 1 | # 原理: PIL的图像旋转函数有一定的损耗, 程序将损耗多次放大 2 | #import numpy as np 3 | from tkinter import * 4 | from PIL import Image,ImageTk 5 | 6 | angle = 20 7 | def animate(): 8 | global imtk,image,id 9 | for i in range(50): 10 | image=image.rotate(angle) 11 | imtk=ImageTk.PhotoImage(image) 12 | cv.delete(id) 13 | id=cv.create_image(120,120,image=imtk) #,anchor = 'nw') 14 | cv.after(2,animate) 15 | 16 | root=Tk() 17 | cv=Canvas(root,bg='black') 18 | cv.pack(side=TOP,expand=True,fill=BOTH) 19 | image=Image.open("旋转特效.jpg","r") 20 | imtk=ImageTk.PhotoImage(image) 21 | id=cv.create_image(100,100,image=imtk) 22 | cv.after(20,animate) 23 | 24 | root.mainloop() 25 | -------------------------------------------------------------------------------- /小项目/图像处理/二维码生成.py: -------------------------------------------------------------------------------- 1 | import sys,qrcode 2 | 3 | SYMBOLS=" ▀▄█" 4 | REVERSED_SYMBOLS="█▄▀ " 5 | 6 | def show_qrcode(matrix,symbols=SYMBOLS,file=None,fill=0): 7 | if file is None:file=sys.stdout 8 | empty_line=[fill]*len(matrix[0]) 9 | for i in range(0,len(matrix),2): 10 | upper_line=matrix[i] 11 | lower_line=matrix[i+1] if i+1 0: 25 | result.append(f"[{pre}] * {length}") 26 | return " + ".join(result) 27 | 28 | def modify_dict(thread_id, iterations): 29 | while not start:pass # 等待开始 30 | for _ in range(iterations): 31 | shared_dict['last_thread'] = thread_id # 原子操作 32 | print(f"Done: {thread_id}") 33 | done[thread_id] = True 34 | 35 | def main(): 36 | global start 37 | iterations = 100 38 | threads = [] 39 | 40 | for i in range(COUNT): 41 | thread = threading.Thread(target=modify_dict, args=(i, iterations)) 42 | threads.append(thread) 43 | thread.start() 44 | 45 | values = [] 46 | start = True # 使所有线程同时开始 47 | while not all(done): 48 | values.append(shared_dict['last_thread']) 49 | print(format_list(values)) 50 | 51 | if __name__ == "__main__":main() -------------------------------------------------------------------------------- /小项目/性能/cpu使用率.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | USAGE=0.5 4 | PERIOD=0.1 # 秒数 5 | 6 | def do():pass 7 | 8 | print("Cpu usage:%f%%"%(USAGE*100)) 9 | # 先重复调用do()函数, 然后根据预设的CPU使用率休眠一段时间 10 | while True: 11 | time.sleep(PERIOD*(1-USAGE)) 12 | s = time.perf_counter() 13 | while time.perf_counter()-s < PERIOD*USAGE: 14 | do() 15 | -------------------------------------------------------------------------------- /小项目/性能/crash.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.setrecursionlimit(10000) 3 | 4 | def crash(n=1,print_times=False): 5 | if print_times:print(n) 6 | return crash(n+1,print_times) 7 | 8 | if __name__=="__main__": 9 | crash(print_times=True) 10 | -------------------------------------------------------------------------------- /小项目/性能/crash.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/性能/crash.pyc -------------------------------------------------------------------------------- /小项目/性能/测试文件系统.py: -------------------------------------------------------------------------------- 1 | import time,os 2 | 3 | files=30 4 | s=time.perf_counter() 5 | for i in range(files): 6 | open(str(i),'wb').close() 7 | print('创建文件',time.perf_counter()-s) 8 | 9 | s=time.perf_counter() 10 | for i in range(files): 11 | os.remove(str(i)) 12 | 13 | print('删除文件',time.perf_counter()-s) 14 | input() 15 | -------------------------------------------------------------------------------- /小项目/性能/申请内存测试.py: -------------------------------------------------------------------------------- 1 | from ctypes import * 2 | import time 3 | 4 | # 仅支持64位Python 5 | malloc = windll.msvcrt.malloc 6 | malloc.argtypes = [c_int64] 7 | malloc.restype = c_int64 8 | calloc = windll.msvcrt.calloc 9 | calloc.argtypes = [c_int64] 10 | calloc.restype = c_int64 11 | free = windll.msvcrt.free 12 | free.argtypes = [c_int64] 13 | free.restype = c_int64 14 | 15 | pointers = [] 16 | while True: 17 | pointer = malloc(2**28) 18 | print(hex(pointer)) 19 | if pointer != 0: 20 | pointers.append(pointer) 21 | else: 22 | break 23 | time.sleep(5) 24 | for p in pointers: 25 | free(p) -------------------------------------------------------------------------------- /小项目/性能/申请内存测试2.py: -------------------------------------------------------------------------------- 1 | # 通过不断申请内存,测试计算机的可用内存极限值 2 | 3 | def convert_size(num): 4 | suffix = ['B', 'KB', 'MB', 'GB', 'TB'] 5 | index = 0 6 | while num >= 1024 and index < len(suffix) - 1: 7 | num /= 1024 8 | index += 1 9 | return f'{round(num, 3)} {suffix[index]}' 10 | 11 | level = 30 # 2**30 12 | lst=[] 13 | total_mem = 0 14 | while True: 15 | try: 16 | memsize = 2**level 17 | lst.append("s"*memsize) 18 | total_mem += memsize 19 | print("已申请内存:%d" % total_mem) 20 | except MemoryError: 21 | level -= 1 22 | if level < 0:break 23 | 24 | print("程序退出,最大可申请内存:%s" % convert_size(total_mem)) -------------------------------------------------------------------------------- /小项目/性能/运行自身.py: -------------------------------------------------------------------------------- 1 | # 无限地运行程序自身, 运行后, 打开任务管理器, 就会出现许多个python.exe 2 | import sys,os,time,subprocess 3 | if len(sys.argv)==3: # 被上一层调用执行 4 | level,t1=int(sys.argv[1]),float(sys.argv[2]) 5 | t2 = time.time() 6 | print("层级 %d 开始运行, 距上一个层级开始 %.4f 秒" % (level,t2-t1)) 7 | else: # 直接执行 8 | level=1 9 | t2 = time.time() 10 | print("层级 1 开始运行") 11 | 12 | # 方法1, 不过也会调用cmd.exe 13 | # os.system('{} "{}" {} {}'.format( 14 | # sys.executable,sys.argv[0],level+1,t2)) 15 | 16 | # 方法2 17 | subprocess.run([sys.executable,sys.argv[0],str(level+1),str(t2)]) 18 | 19 | print("层级 %d 结束, 本层级总耗时 %.4f 秒"%(level,time.time()-t2)) -------------------------------------------------------------------------------- /小项目/性能/进程监视/console_pauser.py: -------------------------------------------------------------------------------- 1 | # 以管理员身份运行用的辅助脚本,用于不关闭控制台 2 | def main(): 3 | del globals()["main"] # 避免污染全局变量 4 | import sys,os,traceback 5 | sys.argv.pop(0) # console_pauser自身 6 | main_script=sys.argv[0] 7 | globals()["__file__"]=main_script 8 | 9 | with open(main_script,encoding="utf-8") as f: 10 | code=f.read() 11 | exit_code=0 12 | try: 13 | exec(compile(code,main_script,"exec"),globals(),globals()) 14 | except SystemExit as err: 15 | exit_code=err.code 16 | except BaseException: 17 | traceback.print_exc() 18 | os.system("pause") 19 | sys.exit(exit_code) 20 | 21 | main() -------------------------------------------------------------------------------- /小项目/文件处理/复制文件工具2.pyw: -------------------------------------------------------------------------------- 1 | #功能: 静默复制目录到另一个目录 2 | import sys,os,shutil,time,traceback 3 | 4 | sys.stderr=open("debug_2.log","w",encoding='utf-8') 5 | # config2.ini示例: 6 | # E:\path1 7 | # E:\path2 8 | 9 | with open("config2.ini") as f: 10 | src=f.readline().strip() 11 | dst=f.readline().strip() 12 | 13 | try:os.mkdir(dst) 14 | except FileExistsError:pass 15 | except Exception:traceback.print_exc() 16 | 17 | print('Waiting',file=sys.stderr) 18 | while not ( os.path.exists(src)): 19 | time.sleep(0.1) 20 | 21 | for d in os.listdir(src): 22 | src_file=os.path.join(src,d) 23 | dst_file=os.path.join(dst,d) 24 | try: 25 | if not os.path.exists(dst_file): 26 | if os.path.isdir(src_file): 27 | shutil.copytree(src_file,dst_file) 28 | else: 29 | shutil.copy(src_file,dst_file) 30 | print('复制 %s 到 %s' % (src_file,dst_file),file=sys.stderr) 31 | except Exception: 32 | traceback.print_exc() 33 | time.sleep(1) 34 | 35 | sys.stderr.flush() 36 | -------------------------------------------------------------------------------- /小项目/文件处理/恢复chk文件中的docx, pptx文档.py: -------------------------------------------------------------------------------- 1 | import sys,os,zipfile 2 | file = "F:\\FOUND.000\\FILE0000.CHK" # U盘里面的chk文件一般类似于这个路径 3 | 4 | # data可以是U盘里面的chk文件,也可以是读取到的原始磁盘数据 5 | data = open(file,'rb').read() 6 | head=b'PK\x03\x04' # zip、docx、pptx等格式的文件头 7 | mark=b"[Content_Types].xml" # 这个也是docx、pptx等格式的标记 8 | estimated_size=2**26 # 恢复出文件的大小(要大于原来的文件) 9 | 10 | # 先找出数据中的文件头 11 | offsets = [] 12 | for i in range(len(data)): 13 | if i % 1000000==0: 14 | print("已处理 %d 字节"%i) # 显示进度 15 | if data[i:i+len(head)]==head and \ 16 | data[i+30:i+30+len(mark)]==mark: # 如果符合文件头及mark 17 | if data[i-1]==0 or i==0: # 如果前一个字节是00 18 | offsets.append(i) 19 | offsets.append(len(data)) 20 | 21 | print("恢复文件") 22 | for i in range(len(offsets)-1): 23 | document = data[offsets[i]:offsets[i]+estimated_size] # 数据从文件头开始,长度大于原来的文件大小 24 | out = "%ds - recovered.pptx"%i # 也可以是docx或xlsx 25 | with open(out,'wb') as f: # 26 | f.write(document) 27 | 28 | # 用zipfile模块检验恢复出的文档是否正常,因为docx、pptx等格式本质上是zip文件 29 | try: 30 | z=zipfile.ZipFile(out) 31 | except zipfile.BadZipFile: 32 | os.rename(out,"%d - recovered(bad).pptx"%i) 33 | -------------------------------------------------------------------------------- /小项目/文件处理/扫描文件.pyw: -------------------------------------------------------------------------------- 1 | # 功能:扫描特定目录(尤其u盘)中的文件 2 | import sys,os,search_file,time,traceback,pprint 3 | sys.stderr=open('debg_scan.log','w') 4 | 5 | scanned=False 6 | with open('config3.ini') as f:dir=f.readline().strip() 7 | 8 | while 1: 9 | try: 10 | if os.path.exists(dir): 11 | t=time.localtime() 12 | file=os.path.join(os.getcwd(),'Scan %d-%d-%d.log' % (t.tm_hour,t.tm_min,t.tm_sec)) 13 | if not scanned: 14 | with open(file,'w') as f: 15 | pprint.pprint(list(search_file.directories(dir)),stream=f) 16 | sys.stderr.write('Scanned %s\r\n'%dir) 17 | scanned=True 18 | else: 19 | scanned=False 20 | except: 21 | traceback.print_exc() 22 | sys.stderr.flush() 23 | time.sleep(1) 24 | -------------------------------------------------------------------------------- /小项目/文件处理/批量更改文件修改日期.py: -------------------------------------------------------------------------------- 1 | import os,time,search_file 2 | 3 | for p in search_file.directories("E:\\python",dirs=False): 4 | t=os.stat(p).st_mtime 5 | tm=time.localtime(t) 6 | if (tm.tm_hour >=22 or tm.tm_hour <=3): 7 | print(p,tm.tm_mday,tm.tm_hour,tm.tm_min) 8 | os.utime(p,times=(t+3600*9,)*2) 9 | -------------------------------------------------------------------------------- /小项目/文件处理/文件base64解码.py: -------------------------------------------------------------------------------- 1 | import binascii 2 | s = binascii.a2b_base64(input()) 3 | with open('result','wb') as f: 4 | f.write(s) 5 | -------------------------------------------------------------------------------- /小项目/文件处理/文件修改日期.py: -------------------------------------------------------------------------------- 1 | import sys,os,time,traceback 2 | if len(sys.argv) == 1: # 用户未提供程序参数 3 | # Windows的控制台窗口支持直接拖入文件 4 | file = os.path.normpath( 5 | input('将一个文件拖到这里 (或输入文件路径),再按Enter: ') 6 | ).strip('"') 7 | files=[file] 8 | while True: 9 | str = input('将一个文件拖到这里 (或输入文件路径),再按Enter。直接按Enter可进入下一步: ') 10 | if not str.strip():break 11 | file = os.path.normpath(str).strip('"') 12 | files.append(file) 13 | else: 14 | files=sys.argv[1:] 15 | 16 | # 实测Windows系统能显示的最大时间: 2108 01 01 (07:59:58) 17 | format = "%Y.%m.%d %H:%M" 18 | time_ = input('输入新的修改日期(格式例如 2023.4.30 21:33),再回车: ') 19 | for file in files: 20 | try: 21 | os.utime(file, 22 | (time.mktime(time.strptime(time_, format)),)*2) 23 | print("修改成功:",file) 24 | except Exception: 25 | traceback.print_exc() # 输出错误信息 26 | 27 | input("按Enter键继续 ..") 28 | 29 | 30 | -------------------------------------------------------------------------------- /小项目/文件处理/文件截断.py: -------------------------------------------------------------------------------- 1 | import sys,os,traceback 2 | 3 | def normpath(path): 4 | path=os.path.normpath(path).strip('"') 5 | if path.endswith(':'): 6 | path += '\\' 7 | return path 8 | 9 | exc=False 10 | if len(sys.argv)<2: 11 | sys.argv.append(input('输入文件名或拖曳文件:')) 12 | print('输入各文件大小:') 13 | for arg in sys.argv[1:]: 14 | arg=normpath(arg) 15 | size=int(input(arg+':')) 16 | try: 17 | with open(arg,'rb+') as f: 18 | f.truncate(size) 19 | except Exception: 20 | traceback.print_exc() 21 | exc=True 22 | 23 | if exc:input() 24 | -------------------------------------------------------------------------------- /小项目/文件处理/清理cef程序缓存.py: -------------------------------------------------------------------------------- 1 | # 程序可用于清理常用软件如WPS、钉钉、Edge的缓存数据,适用于大多数软件 2 | # 原理:自动识别CEF架构程序缓存的所在文件夹,并清理 3 | import sys,os,shutil,traceback 4 | import search_file 5 | 6 | folders=["blob_storage","Cache","Code Cache","databases", 7 | "Local Storage","Service Worker","Session Storage"] 8 | count = 0 9 | for direc in search_file.direc("C:\\",files=False): 10 | try: 11 | flag=True 12 | for fd in folders: 13 | if not os.path.isdir(os.path.join(direc,fd)): 14 | flag=False 15 | if flag: 16 | print("清理",os.path.join(direc,"Cache")) 17 | shutil.rmtree(os.path.join(direc,"Cache")) 18 | print("清理",os.path.join(direc,"Service Worker\\CacheStorage")) 19 | shutil.rmtree(os.path.join(direc,"Service Worker\\CacheStorage")) 20 | except Exception: 21 | print("清理",direc,"出错") 22 | # 说明:清理某些软件缓存需要管理员权限 23 | traceback.print_exc() 24 | count+=1 25 | if count % 1000==0: 26 | print("已扫描",count,"个文件夹") 27 | 28 | input("按Enter键继续 ..") -------------------------------------------------------------------------------- /小项目/文件处理/清理空文件夹.py: -------------------------------------------------------------------------------- 1 | # 清除空文件(夹)的工具 2 | import sys,os 3 | from logging import basicConfig,log,INFO 4 | from search_file import direc 5 | 6 | __ver__="1.4" 7 | # --files:只删除空文件 8 | # --dirs:只删除空文件夹 9 | basicConfig(filename="delete.log",level=INFO) 10 | del_dirs=not '--files' in sys.argv or '--dirs' in sys.argv 11 | del_files=not '--dirs' in sys.argv or '--files' in sys.argv 12 | 13 | dir=sys.argv[1] if len(sys.argv)>1 and not sys.argv[1].startswith("-") else "C:\\" 14 | deleted_files=[] 15 | for path in direc(dir): 16 | try: 17 | if not "windows" in path.lower(): 18 | if os.path.isfile(path): 19 | if del_files and os.path.getsize(path)==0: 20 | print("删除文件: %s"%path) 21 | log(INFO,"删除文件: %s"%path) 22 | os.remove(path) 23 | deleted_files.append(path) 24 | elif del_dirs and not os.listdir(path): 25 | print("删除空文件夹: %s"%path) 26 | log(INFO,"删除文件: %s"%path) 27 | os.removedirs(path) 28 | deleted_files.append(path) 29 | except Exception as err: 30 | print(err,file=sys.stderr) 31 | 32 | print("\n共删除空文件和空文件夹 %d 个"%len(deleted_files)) 33 | if 0 val: 14 | # 递增时 15 | if math.isclose(y,val,rel_tol=PRECISION): # 判断两个浮点数是否接近,这里不能用"==" 16 | print("查找次数:",cnt+1) 17 | return x 18 | elif val < y: 19 | min = x # 右移 20 | else: 21 | max = x # 左移 22 | elif val2 < val: 23 | # 递减时 24 | if math.isclose(y,val): 25 | print("查找次数:", cnt + 1) 26 | return x 27 | elif val > y: 28 | min = x # 右移 29 | else: 30 | max = x # 左移 31 | else: # 调整rate1和rate2,再次判断单调性 32 | rate1 = 0.25 + rate1 / 2 # 减小rate1, rate2之间的差,使取点更接近x 33 | rate2 = 0.25 + rate2 / 2 34 | cnt += 1 35 | # 达到了最大次数,仍未找到结果 36 | if math.isclose(max,start_min,rel_tol=PRECISION): 37 | print("结果应小于最小值 (%d)"%start_min) 38 | elif math.isclose(min,start_max,rel_tol=PRECISION): 39 | print("结果应大于最大值 (%d)"%start_max) 40 | else: 41 | print("精度设定值可能过小") 42 | 43 | def guess(): 44 | def func(x): 45 | return x ** 2 46 | # 在0-10范围内, func(x)=10, 求x 47 | print("结果:",getvalue(func,10,0,10)) 48 | 49 | if __name__=="__main__":guess() 50 | -------------------------------------------------------------------------------- /小项目/算法/信息熵.py: -------------------------------------------------------------------------------- 1 | import sys,os,math 2 | from collections import Counter 3 | 4 | def calc_entropy(data): 5 | # 计算字节频率 6 | byte_counter = Counter(data) 7 | total_bytes = len(data) 8 | 9 | # 计算熵 10 | entropy = 0 11 | for count in byte_counter.values(): 12 | probability = count / total_bytes 13 | entropy -= probability * math.log2(probability) 14 | 15 | return entropy 16 | 17 | def main(): 18 | files = sys.argv[1:] 19 | 20 | if not files: 21 | print("用法:python %s <文件1> <文件2> ... "%sys.argv[0]) 22 | return 23 | 24 | for path in files: 25 | if os.path.isfile(path): 26 | with open(path, 'rb') as f: 27 | data = f.read() 28 | entropy = calc_entropy(data) 29 | print(f"文件 '{path}' 的信息熵为:{entropy:.6f} b") 30 | else: 31 | print(f"路径 '{path}' 不是有效的文件!") 32 | 33 | if __name__ == "__main__":main() 34 | -------------------------------------------------------------------------------- /小项目/算法/冒泡排序找出名次.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def find_rank(lst,N): 4 | # lst:待查找的列表 N:第几名 5 | lst=lst.copy() 6 | if N<=0 or N>len(lst): 7 | return None # 未找到 8 | n=len(lst) 9 | rank=-1;cnt=0 # rank:列表末已有多少个排名的数据有序 10 | while cnt1 and lst[n-cnt+1]>lst[n-cnt]: # cnt==1为第一次交换,用于处理第一名的情况 16 | rank+=1 # 如果后面的数据大于前面的数据(不等于),就增加一名当前排名 17 | print(lst,cnt,rank) 18 | 19 | if ranklen(num2): 18 | # s=int(num1[-len(num2)-1])+add 19 | # result=str(s)+result 20 | # elif add > 0: 21 | if add > 0: 22 | result=str(add)+result 23 | 24 | #result=num1[:-len(num2)-1]+result # 加上num1多出来的部分 25 | return result 26 | 27 | for i in range(1000): 28 | num1,num2=str(randint(0,10000)),str(randint(0,10000)) 29 | result=solution([num1,num2]) 30 | if result != str(int(num1)+int(num2)): 31 | raise Exception("计算错误: %s %s %s"%(num1,num2,result)) 32 | else: 33 | print("计算正确: %s %s %s"%(num1,num2,result)) -------------------------------------------------------------------------------- /小项目/算法/字符串最长回文.py: -------------------------------------------------------------------------------- 1 | #题目名称:小艺照镜子 2 | #时间限制:1000ms内存限制:256M 3 | #题目描述: 4 | #已知字符串str。 输出字符串str中最长回文串的长度。 5 | 6 | #输入描述: 7 | #输入字符串s.(1<=len(str)<=10000) 8 | def solution(s): 9 | lst_len=[];j=0 # lst_len保存各个可能的回文串长度 10 | # 处理奇数长度回文, 如"aba" 11 | for i in range(len(s)): 12 | dt = min(i+1,len(s)-i) # 循环的次数 13 | flag=False # 标识是否已遇到不是回文的字符 14 | for j in range(dt): 15 | if s[i+j] != s[i-j]: # 回文两边的字符不相等 16 | lst_len.append((j-1)*2+1) 17 | flag=True 18 | break 19 | if not flag:lst_len.append(j*2+1) 20 | # 处理偶数长度回文, 如"ffff" 21 | for i in range(len(s)): 22 | dt = min(i+1,len(s)-i+1) 23 | flag=False 24 | for j in range(dt): 25 | if s[i+j-1] != s[i-j]: # 这里变成了i+j-1 26 | lst_len.append((j-1)*2) 27 | flag=True 28 | break 29 | if not flag:lst_len.append(j*2) 30 | 31 | return max(lst_len) 32 | 33 | print(solution("ffff")) 34 | print(solution("abababaffff")) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/欧拉法.py: -------------------------------------------------------------------------------- 1 | G_const=1;M=100000 2 | def G(r): 3 | return G_const*M/r**2 # 引力公式的变形 4 | 5 | h=100;v=t=0 6 | dt=0.01 7 | while h>1: #1为天体的半径,h到了1表示坠落到了天体表面 8 | t+=dt 9 | #old_v=v 10 | v+=G(h)*dt 11 | h-=v*dt 12 | print("%.6g: %.6g %.6g"%(t,v,h)) 13 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/欧拉法_自由落体.py: -------------------------------------------------------------------------------- 1 | h=100;v=t=0 2 | g=10 3 | dt=0.01 4 | while h>0: 5 | t+=dt 6 | #v1=v 7 | v+=g*dt 8 | h-=v*dt # 或v1*dt 9 | print("%.6g: %.6g %.6g"%(t,v,h)) 10 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/龙格库塔法.py: -------------------------------------------------------------------------------- 1 | G_const=1;M=100000 2 | def G(r): 3 | return G_const*M/r**2 # 引力公式的变形 4 | 5 | h=100;v=t=0 6 | dt=0.01 7 | surface=1 8 | while h>surface: #1为天体的半径,h到了1表示坠落到了天体表面 9 | t+=dt 10 | v1=v 11 | g1=G(h) # 当前的加速度g 12 | temp_v=v+g1*dt 13 | temp_h=h-(v+temp_v)/2*dt 14 | g2=G(temp_h) # 下一个状态预测的加速度g 15 | v+=(g1+g2)/2*dt 16 | h-=(v1+v)/2*dt 17 | 18 | print("%.6g: %.6g %.6g"%(t,v,h)) 19 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/龙格库塔法_自由落体.py: -------------------------------------------------------------------------------- 1 | h=100;v=t=0 2 | g=10 3 | dt=0.01 4 | while h>0: 5 | t+=dt 6 | v1=v 7 | v+=g*dt 8 | h-=(v1+v)/2*dt 9 | print("%.6g: %.6g %.6g"%(t,v,h)) 10 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/龙格库塔法_自适应步长.py: -------------------------------------------------------------------------------- 1 | G_const=1;M=100000 2 | def G(r): 3 | return G_const*M/r**2 # 引力公式的变形 4 | 5 | h=100;v=t=0 6 | dt=0.01 7 | expected_step_h=0.1 8 | surface=1 9 | while h>surface: # surface为天体的半径,h到了surface表示坠落到了天体表面 10 | t+=dt 11 | v1=v 12 | g1=G(h) # 当前的加速度g 13 | temp_v=v+g1*dt 14 | temp_h=h-(v+temp_v)/2*dt 15 | g2=G(temp_h) # 下一个状态预测的加速度g 16 | v+=(g1+g2)/2*dt 17 | next_dt=expected_step_h/((v1+v)/2) 18 | h-=(v1+v)/2*dt 19 | dt=next_dt 20 | 21 | print("%.6g: %.6g %.6g"%(t,v,h)) 22 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/数值模拟/龙格库塔法_黑洞.py: -------------------------------------------------------------------------------- 1 | G_const=1;M=100000 2 | def G(r): 3 | return G_const*M/r**2 # 引力公式的变形 4 | 5 | h=100;v=t=0 6 | dt=0.01 7 | expected_step_rate=0.001 8 | surface=0 9 | while h>surface: # surface为天体的半径,h到了surface表示坠落到了天体表面 10 | t+=dt 11 | v1=v 12 | g1=G(h) # 当前的加速度g 13 | temp_v=v+g1*dt 14 | temp_h=h-(v+temp_v)/2*dt 15 | g2=G(temp_h) # 下一个状态预测的加速度g 16 | v+=(g1+g2)/2*dt 17 | next_dt=(h*expected_step_rate)/((v1+v)/2) 18 | h-=(v1+v)/2*dt 19 | dt=next_dt 20 | 21 | print("%.6g: %.6g %.6g"%(t,v,h)) 22 | print("坠落用时:",t) -------------------------------------------------------------------------------- /小项目/算法/生成随机数.py: -------------------------------------------------------------------------------- 1 | import math 2 | import numpy as np 3 | import matplotlib.pyplot as plt 4 | from random import random as random2 5 | 6 | class LinearCongruence: 7 | def __init__(self,seed,k,b,p): 8 | self.seed=seed 9 | self.k=k;self.b=b;self.p=p 10 | def random(self): 11 | self.seed = (self.seed*self.k + self.b) % self.p 12 | return self.seed 13 | 14 | def count(lst,max_value,d): 15 | # 统计lst中每个范围内数值的出现次数,d为组距 16 | result=[0]*math.ceil(max_value/d) # ceil为向上取整 17 | for i in lst: 18 | result[int(i//d)]+=1 19 | return result 20 | 21 | plt.rcParams['font.sans-serif'] = ['SimHei'] # 用于正常显示中文 22 | seed = 1.7 23 | k=5.6;b=3.5 24 | p=1;d=0.001 25 | 26 | l=[] 27 | cnt=10000 28 | lc=LinearCongruence(seed,k,b,p) 29 | for j in range(cnt): 30 | l.append(lc.random()) 31 | 32 | # 绘制l从0至1的数值分布直方图,检验随机数的数值分布是否均匀 33 | l=count(l,p,d) 34 | 35 | linspace=np.linspace(0,d*(p/d-1),int(p/d)) 36 | plt.bar(linspace,l,width=d) 37 | plt.title("自制的线性同余算法") 38 | plt.xlabel("数值") 39 | plt.ylabel("出现次数") 40 | plt.show() 41 | 42 | l2=[random2() for i in range(cnt)] 43 | # 绘制l2的数值分布直方图 44 | l2=count(l2,p,d) 45 | plt.bar(linspace,l2,width=d) 46 | plt.title("Python内置random模块") 47 | plt.xlabel("数值") 48 | plt.ylabel("出现次数") 49 | plt.show() 50 | -------------------------------------------------------------------------------- /小项目/算法/简易正则表达式匹配.py: -------------------------------------------------------------------------------- 1 | #import timer_tool # timer_tool.py 2 | import pprint 3 | cache={} # 缓存之前计算的结果,避免重复计算 4 | cnt=0 5 | def _isMatch(s: str, p: str,level=0) -> bool: 6 | global cnt;cnt+=1 7 | print("s:",s,"p:",p,"level:",level) # level仅用于调试 8 | for i in range(len(p)): 9 | if i+1=len(s): 33 | return False 34 | elif s[i]!=p[i] and not p[i]==".": 35 | return False 36 | if len(p)==len(s):return True # 无*号时,字符串已被全部匹配完 37 | else:return False 38 | def isMatch(s,p,level=0): 39 | if (s,p) in cache: 40 | return cache[(s,p)] 41 | else: 42 | result=_isMatch(s,p,level) 43 | cache[(s,p)]=result 44 | return result 45 | 46 | #t=timer_tool.Timer() 47 | result=isMatch("aaaaaaaaaaaaaaaaaaa","a*a*a*a*a*a*a*a*a*b") 48 | #t.printtime() 49 | print("结果:",result) 50 | print("调用次数:",cnt) 51 | #pprint.pprint(cache) -------------------------------------------------------------------------------- /小项目/算法/迭代计算.py: -------------------------------------------------------------------------------- 1 | import timer_tool,math 2 | s=float(input("输入s(x**x=s): ")) 3 | t=timer_tool.Timer() # 开始计时 4 | # 法一(实测证明s>=e**e (x>=e(≈2.71828))时收敛会较慢) 5 | x=1;cnt=0 6 | while True: 7 | x=s ** (1/x) # 相当于 x=x√(s) 8 | cnt+=1 9 | if math.isclose(x**x,s): 10 | break 11 | # 法二:二分法(详见 二分法(数学).py) 12 | 13 | time=t.gettime() 14 | print("x=",x,"x**x=",x**x) 15 | print("迭代次数:",cnt,"用时(秒):",time,"每次迭代平均用时(秒):",time/cnt) -------------------------------------------------------------------------------- /小项目/面向对象/msgbox.py: -------------------------------------------------------------------------------- 1 | "使用消息框代替sys.stdout等对象输出的程序" 2 | import sys 3 | from tkinter import Tk 4 | from tkinter.messagebox import * 5 | 6 | __ver__='1.1' 7 | _root=None 8 | _old_stdout=sys.stdout 9 | _old_stderr=sys.stderr 10 | 11 | class Stdout(object): 12 | def __init__(self,autoflush=False): 13 | self.autoflush=autoflush 14 | self.buffer='' 15 | def write(self,string): 16 | self.buffer+=string 17 | if self.autoflush:self.flush() 18 | def flush(self): 19 | if self.buffer and not self.buffer=='\n': 20 | showinfo("",self.buffer,master=_root) 21 | self.buffer="" 22 | 23 | class Stderr(Stdout): 24 | def flush(self): 25 | if self.buffer and not self.buffer=='\n': 26 | showwarning("Error",self.buffer,master=_root) 27 | self.buffer="" 28 | 29 | # 初始化,使sys.stdout和sys.stderr对象输出到文本框 30 | def init(stdout=True,stderr=True,autoflush=False,hide_root=True): 31 | global _root 32 | _root=Tk() # 使用root的目的是避免弹出消息框时多创建一个空白窗口 33 | if hide_root: 34 | _root.state('iconic') 35 | _root.withdraw() 36 | if stdout:sys.stdout=Stdout(autoflush) 37 | if stderr:sys.stderr=Stderr(autoflush) 38 | 39 | def reset(): # 恢复原来的sys.stdout和sys.stderr对象 40 | sys.stdout=_old_stdout 41 | sys.stderr=_old_stderr 42 | 43 | def main(): 44 | init() 45 | print("Hello world!") 46 | raise 47 | 48 | if __name__=="__main__": 49 | main() 50 | reset() 51 | -------------------------------------------------------------------------------- /小项目/面向对象/对象引用.py: -------------------------------------------------------------------------------- 1 | import sys,gc,time,traceback 2 | 3 | def debug(dict_): 4 | # 用来在交互式提示符中调试,参数dict_为命名空间 5 | while 1: 6 | s=input('>>> ').rstrip() 7 | if s: 8 | if s=='continue':break 9 | try:exec(compile(s,'','single'),dict_) 10 | except Exception: 11 | traceback.print_exc() 12 | #lst=[] 13 | class C: 14 | count=0 15 | def __init__(self): 16 | self.id=self.count 17 | C.count+=1 18 | print("{} was born".format(self)) 19 | def __repr__(self): 20 | return object.__repr__(self)[:-1]+" id:%d>"%self.id 21 | def __del__(self): 22 | #lst.append(self) 23 | print("{} died".format(self),'is_finalizing',sys.is_finalizing()) 24 | # 提示:解释器关闭过程中产生的所有异常都会被忽略, 25 | # 即显示Exception ignored in:... 26 | if sys.is_finalizing(): 27 | debug(locals()) 28 | 29 | def test(): 30 | while True: 31 | c=C() 32 | print() 33 | #time.sleep(0.1) 34 | 35 | if __name__=="__main__": 36 | sys.c=C() 37 | test() 38 | -------------------------------------------------------------------------------- /小项目/面向对象/对象引用2.py: -------------------------------------------------------------------------------- 1 | import sys,gc,time 2 | 3 | #lst=[] 4 | class C: 5 | count=0 6 | def __init__(self): 7 | self.id=self.count 8 | C.count+=1 9 | print("{} was born".format(self)) 10 | def __repr__(self): 11 | return object.__repr__(self)[:-1]+" id:%d>"%self.id 12 | def __del__(self): 13 | #lst.append(self) 14 | #print("{} died".format(self)) 15 | print('died') 16 | print('is_finalizing:',sys.is_finalizing()) 17 | time.sleep(1) 18 | 19 | def test(): 20 | c=C() 21 | 22 | if __name__=="__main__": 23 | c=C() 24 | print('Shutting down') 25 | -------------------------------------------------------------------------------- /小项目/面向对象/对象引用3.py: -------------------------------------------------------------------------------- 1 | def f():pass 2 | old_f=f 3 | l=[];first=True 4 | while True: 5 | try: 6 | l.append(f) # 这一步内存会被无限占用 7 | f=f.__call__ 8 | except MemoryError: 9 | if first: 10 | print('MemoryError',len(l)) 11 | first=False 12 | -------------------------------------------------------------------------------- /小项目/面向对象/计算对象占用字节.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from pyobject.search import make_iter 3 | 4 | def printer(*args): 5 | try: 6 | print(*args) 7 | except KeyboardInterrupt: 8 | printer(*args) 9 | 10 | size=0 11 | l=[] 12 | iter=make_iter(sys.modules,4) 13 | for obj in iter: 14 | try: 15 | if obj not in l: 16 | size+=sys.getsizeof(obj) 17 | l.append(obj) 18 | except KeyboardInterrupt: 19 | printer(size) 20 | 21 | print(size) 22 | -------------------------------------------------------------------------------- /小项目/音频/README.txt: -------------------------------------------------------------------------------- 1 | 包含作者编写的音频项目(完善中)。 2 | 注: System.Speech.dll是"调用Windows内置语音合成.py"必需的DLL文件(不分32位和64位)。 -------------------------------------------------------------------------------- /小项目/音频/System.Speech.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qfcy/Python/c0b112f965e400e6b58d2eeb5ecfea1871ba9473/小项目/音频/System.Speech.dll -------------------------------------------------------------------------------- /小项目/音频/music.pyw: -------------------------------------------------------------------------------- 1 | "A program that uses winsound module to play music." 2 | import winsound,math,re,sys,time 3 | 4 | music1="123 3 3 345 5 5 54321" 5 | music2="53100 5310" 6 | freqs=[None,264,297,330,352,396,440,495,528,556] 7 | 8 | def music(notation,duration): 9 | patt=re.compile(r"([0-9](\-| ){0,8})") 10 | for pitch in re.findall(patt,notation): 11 | pitch=pitch[0] 12 | if pitch[0]=="0":time.sleep(duration/1000) 13 | else: 14 | yield freqs[int(pitch[0])],duration*len(pitch) 15 | 16 | def sinewave(times,duration=100): 17 | pitch=None 18 | for i in range(times): 19 | pitch=int(math.sin(i/6.28)*600+700) 20 | yield pitch,duration 21 | 22 | def __demo(): 23 | for i in range(3): 24 | for freq,duration in music(music2,250): 25 | winsound.Beep(freq,duration) 26 | time.sleep(2.5) 27 | 28 | def main(): 29 | if len(sys.argv)>1: 30 | for arg in sys.argv[1:]: 31 | try: 32 | f=open(arg,"r",encoding="utf-8") 33 | for freq,duration in music(f.read(),250): 34 | winsound.Beep(freq,duration) 35 | time.sleep(0.5) 36 | except OSError:pass 37 | else:__demo() 38 | 39 | if __name__=="__main__":main() 40 | -------------------------------------------------------------------------------- /小项目/音频/生成声波1.py: -------------------------------------------------------------------------------- 1 | import wave 2 | from io import BytesIO 3 | from winsound import PlaySound,SND_MEMORY 4 | 5 | file = 'test.wav' 6 | cache = {} 7 | def Beep(frequency,duration): 8 | if (frequency,duration) in cache: 9 | data=cache[(frequency,duration)] 10 | else: 11 | len_= duration / 1000 # 秒 12 | sampwidth = 1 13 | framerate = 22050 14 | length = int(framerate * len_ * sampwidth) 15 | para = [0b00000000]*(framerate//frequency//2*sampwidth)\ 16 | +[0b11111111]*(framerate//frequency//2*sampwidth) 17 | data=bytes(para) 18 | 19 | f=BytesIO() 20 | fw = wave.open(f,'wb') 21 | fw.setnchannels(1) 22 | fw.setsampwidth(sampwidth) 23 | fw.setframerate(framerate) 24 | #fw.setnframes(length) 25 | fw.writeframes(data * (length // len(data))) 26 | 27 | f.seek(0);data=f.read() 28 | #with open(file,'wb') as f:f.write(data) 29 | cache[(frequency,duration)]=data 30 | 31 | PlaySound(data,SND_MEMORY) 32 | 33 | def test(): 34 | Beep(100,1700) 35 | 36 | if __name__=='__main__':test() 37 | -------------------------------------------------------------------------------- /小项目/音频/调用Windows内置语音合成.py: -------------------------------------------------------------------------------- 1 | import clr,ctypes 2 | clr.AddReference("System.Speech") 3 | from System.Speech.Synthesis import * 4 | 5 | speak = SpeechSynthesizer() 6 | speak.SelectVoice('Microsoft Zira Desktop') 7 | #speak.SetOutputToWaveFile("输出.wav") 8 | speak.Speak("Hello world") 9 | speak.SelectVoice('Microsoft Huihui Desktop') 10 | speak.Speak("中文") 11 | #speak.SetOutputToDefaultAudioDevice() -------------------------------------------------------------------------------- /编译pyd文件.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | from Cython.Build import cythonize 3 | import sys,os,traceback 4 | 5 | filename = sys.argv[1] if len(sys.argv)==2 \ 6 | else input("拖曳或输入文件名: ") 7 | sys.argv[1:] = ['build_ext','--inplace'] 8 | try: 9 | setup( 10 | name = os.path.splitext(os.path.split(filename)[1])[0], 11 | ext_modules = cythonize(filename), 12 | ) 13 | except (Exception,SystemExit): 14 | traceback.print_exc() 15 | os.system('pause') --------------------------------------------------------------------------------