https://www.runoob.com/w3cnote/pycharm-windows-install.html
https://zhuanlan.zhihu.com/p/26066151
pycharm安装配置
python -m ensurepip
python -m pip install --upgrade pip==18.0 //安装低版本的pip 18.0
pip3 install PyMySQL //安装依赖包pymysql
urlparse (scheme、netloc、path等)
python2
from urllib2 import urlparse
python3
from urlib.parse import urlparse
url = "http://localhost/test.py?a=hello&b=world "
from urlib2 import urlparse
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named urlib2from urllib2 import urlparse
result = urlparse.urlparse(url)
result
ParseResult(scheme=‘http’, netloc=‘localhost’, path=’/test.py’, params=’’, query=‘a=hello&b=world ‘, fragment=’’)
result.scheme : 网络协议
result.netloc: 服务器位置(也有可能是用户信息)
result.path: 网页文件在服务器中的位置
result.params: 可选参数
result.query: &连接键值对
result.fragment:
博客介绍了PyCharm的安装配置,包括使用命令安装低版本pip和依赖包pymysql。还提及了Python不同版本中urlparse的导入方式,并通过示例展示了使用urlparse解析URL,说明了解析结果各部分代表的网络协议、服务器位置等信息。
1325

被折叠的 条评论
为什么被折叠?



