南宁市建设处网站,抖音网络营销案例,广州在建火车站在哪里,上海知名的网站建设公目的
Python3 官方文档位于 https://docs.python.org/3/ #xff0c; 有时候网络无法连接#xff0c;或者连接速度慢#xff0c; 这对于学习 Python 时的反馈造成了负面影响。准备一份本地 Python 文档可以让反馈更加及时。
下面给出 macOS 和 Win11 下的 Python 离线文档…目的
Python3 官方文档位于 https://docs.python.org/3/ 有时候网络无法连接或者连接速度慢 这对于学习 Python 时的反馈造成了负面影响。准备一份本地 Python 文档可以让反馈更加及时。
下面给出 macOS 和 Win11 下的 Python 离线文档安装和查看方式。
macOS
本地是 macOS 系统。
下载 python html 格式文档 https://docs.python.org/3/download.html
下载logo png图像 https://www.python.org/community/logos/
创建 PythonDoc.sh 用于创建 PythonDoc.app:
#!/bin/bash# This script generates /Application/PythonDoc.app, which can be searched in launchpad
# You should have already downloaed Python HTML document from https://docs.python.org/3/download.htmlmkdir -p ~/Applications/PythonDoc.app/Contents/MacOS
mkdir -p ~/Applications/PythonDoc.app/Contents/Resourcescat EOF ~/Applications/PythonDoc.app/Contents/MacOS/PythonDoc
#!/bin/bash
open /Users/zz/Documents/python-3.12.5-docs-html/index.html
EOFchmod x ~/Applications/PythonDoc.app/Contents/MacOS/PythonDoccat EOF ~/Applications/PythonDoc.app/Contents/Info.plist
?xml version1.0 encodingUTF-8?
!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd
plist version1.0
dictkeyCFBundleExecutable/keystringPythonDoc/stringkeyCFBundleIdentifier/keystringorg.python.doc/stringkeyCFBundleName/keystringPythonDoc/stringkeyCFBundleVersion/keystring1.0/stringkeyCFBundlePackageType/keystringAPPL/stringkeyCFBundleIconFile/keystringPython.icns/string
/dict
/plist
EOFcp python-logo-only.icns ~/Applications/PythonDoc.app/Contents/Resources/Python.icnsrm -rf /Applications/PythonDoc.app
mv ~/Applications/PythonDoc.app /Applications/效果 Win11
下载 Python html 格式文档 https://docs.python.org/3/download.html
解压到 D:/docs/python-3.12.5-docs-html 目录
进入 C:\ProgramData\Microsoft\Windows\Start Menu\Programs 目录 创建 Python 目录
进入 D:/docs/python-3.12.5-docs-html 目录 创建 index.html 的快捷方式并剪切到 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 目录 重命名为 Python Documentation.html 文件 进入开始菜单输入 Python doc可以看到创建的应用 执行查询