pyreverse分析python工程

参数列表:

  -f , --filter-mode=
                        filter attributes and functions according to
                        . Correct modes are :
                        'PUB_ONLY' filter all non public attributes
                        [DEFAULT], equivalent to PRIVATE+SPECIAL_A
                        'ALL' no filter                             'SPECIAL'
                        filter Python special functions
                        except constructor                             'OTHER'
                        filter protected and private
                        attributes [current: PUB_ONLY]
  -c , --class=
                        create a class diagram with all classes related to
                        ; this uses by default the options -ASmy
                        [current: none]
  -a , --show-ancestors=
                        show  generations of ancestor classes not in
                        
  -A, --all-ancestors   show all ancestors off all classes in 
  -s , --show-associated=
                        show  levels of associated classes not in
                        
  -S, --all-associated  show recursively all associated off all associated
                        classes
  -b, --show-builtin    include builtin objects in representation of classes
  -m [yn], --module-names=[yn]
                        include module name in representation of classes
  -k, --only-classnames
                        don't show attributes and methods in the class boxes;
                        this disables -f values
  -o , --output=
                        create a *. output file if format available.
                        [current: dot]
  --ignore=
                        Add files or directories to the blacklist. They should
                        be base names, not paths. [current: CVS]
  -p , --project=
                        set the project name. [current: none]

-ASmy相关联的都显示出来,较为全面,包括第三方的库,比如tensorflow等,可能会冗余,较乱。
-c选项只追踪一个特定的类,默认会带-ASmy选项,如果不想让联系显示进来,只显示类的继承关系时,可以另外使用-s0选项指定(但有时候不会起作用),注意这里的类名要给相对路径(这个字是linux下搜狗输入法的问题)下的全名。
-o输出的格式,最好选用pdf格式,图片格式默认不是矢量图,会看不清。
只寻求此工程目录下的类关系结构的话,可以只使用-my参数

example:
pyreverse -my -o pdf
生成结果会保存在当前命令执行的路径下。

你可能感兴趣的:(pyreverse分析python工程)