• 小技能(二)


    运行命令框

    运行Python

    接着import(库名)

    最后help(库名)

    python3关于urllib中urlopen报错问题的解决

    00x1 问题的出现

    00x2 问题的解决途径

        我们先来看下官方文档的解释:

    [html]view plain copy
     
     
     
     
    1. a new urllib package was created. It consists of code from  
    2. urllib, urllib2, urlparse, and robotparser. The old  
    3. modules have all been removed. The new package has five submodules:  
    4. urllib.parse, urllib.request, urllib.response,  
    5. urllib.error, and urllib.robotparser. The  
    6. urllib.request.urlopen() function uses the url opener from  
    7. urllib2. (Note that the unittests have not been renamed for the  
    8. beta, but they will be renamed in the future.)  


      也就是说官方3.0版本已经把urllib2,urlparse等五个模块都并入了urllib中,也就是整合了。

    00x3 正确的使用方法

     

    cmd新建、删除文件和文件夹

    新建文件夹和文件

    cd .. 返回上一级
    md test 新建test文件夹
    md d: estmy d盘下新建文件夹
    cd test 进入test文件夹
    cd.>cc.txt 新建cc.txt文件
    dir 列出文件夹下所有文件及文件夹
    删除文件夹和文件

    cd test 进入test文件夹
    dir 查看所有文件目录
    del a.txt 删除a.txt的文件
    del *.txt 删除所有后缀为.txt的文件
    rd test 删除名为test的空文件夹
    rd /s D: est 删除D盘里的test文件夹 会出现如下 test, 是否确认(Y/N)? 直接输入 Y 在回车
    rd test/s 删除此文件夹下的所有文件 test, 是否确认(Y/N)? 直接输入 Y 在回车
    d

  • 相关阅读:
    下划线的学习4
    下划线的学习3
    下划线的学习2
    下划线的学习1
    小程序登录 之 支付宝授权
    开发第一个flutter程序 hello world
    flutter 环境安装以及配置
    地图组件上的自定义区域叠加层显示 ArcGis + GeoJson
    Netty+MUI从零打造一个仿微信的高性能聊天项目,兼容iPhone/iPad/安卓
    linux 下的emoji在MariaDB中的字符集修改
  • 原文地址:https://www.cnblogs.com/King-boy/p/10871048.html
Copyright © 2020-2023  润新知