zoukankan      html  css  js  c++  java
  • python2代码升级到python3工具

    python模块lib2to3(py2转py3自动化工具)
     1 Usage: 2to3 [options] file|dir ...
     2 
     3 Options:
     4   -h, --help            show this help message and exit
     5   -d, --doctests_only   Fix up doctests only
     6   -f FIX, --fix=FIX     Each FIX specifies a transformation; default: all
     7   -j PROCESSES, --processes=PROCESSES
     8                         Run 2to3 concurrently
     9   -x NOFIX, --nofix=NOFIX
    10                         Prevent a transformation from being run
    11   -l, --list-fixes      List available transformations
    12   -p, --print-function  Modify the grammar so that print() is a function
    13   -v, --verbose         More verbose logging
    14   --no-diffs            Don't show diffs of the refactoring
    15   -w, --write           Write back modified files
    16   -n, --nobackups       Don't write backups for modified files
    17   -o OUTPUT_DIR, --output-dir=OUTPUT_DIR
    18                         Put output files in this directory instead of
    19                         overwriting the input files.  Requires -n.
    20   -W, --write-unchanged-files
    21                         Also write files even if no changes were required
    22                         (useful with --output-dir); implies -w.
    23   --add-suffix=ADD_SUFFIX
    24                         Append this string to all output filenames. Requires
    25                         -n if non-empty.  ex: --add-suffix='3' will generate
    26                         .py3 files.

    eg:2to3 -w test.py

  • 相关阅读:
    cull/clip distance example
    Sutherland-Hodgeman多边形裁剪
    OpenCV 脸部跟踪(3)
    人脸识别中的Procruster analysis应用
    卡尔曼滤波的原理说明
    偏导数
    泊松分布E(X^2)
    抽奖概率
    卡尔曼滤波的原理说明
    卡尔曼滤波3
  • 原文地址:https://www.cnblogs.com/buyizhiyou/p/8966583.html
Copyright © 2011-2022 走看看