zoukankan      html  css  js  c++  java
  • 打开外部文件的几种 语法, openFile <filename_string> [ mode:<mode_string> ]

    openFile <filename_string> [ mode:<mode_string> ] 语法   

     

    语法默认是,rt - read-only text - file must exist 只读文件,文件必须存在。这个是关键点。

     

    r - read-only text - file must exist 只读文件 文件必须存在。

    rb - read-only binary - file must exist 只读二进制文件,文件必须存在。

    r+ - read/write text - file must exist  读写文件 文件必须存在

    a - write-only text, append writes - file must exist --只写文件 文件必须存在。

    at - write-only text, append writes - file must exist 只写文件 文件必须存在

    ab - write-only binary, append writes - file must exist 只写二进制文件 文件必须存在

    a+ - read/write text, append writes - file must exist 读写文件 附上写 文件必须存在

    w - write-only text - deletes file contents if it exists  只写文件删除文件内容 如果他存在

    wt - write-only text - deletes file contents if it exists

    wb - write-only binary - deletes file contents if it exists

    w+ - read/write text - deletes file contents if it exists

     

     

     

     

     

     

     

     

     

     

  • 相关阅读:
    Pycharm(一)下载安装
    Django(一)创建和启动项目
    windows10自动登陆
    Tushare安装
    笑话
    python异常处理
    XPath与Xquery
    XML相关概念
    JDK、JRE、JVM三者间的关系
    CMS
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2079625.html
Copyright © 2011-2022 走看看