Coder Social home page Coder Social logo

Comments (4)

cdfmlr avatar cdfmlr commented on May 14, 2024

我自己在使用的过程中也遇到了类似的问题,我的考虑是提供一种“流程图入口点”的指定。例如:

# example.py

def foo():
    pass

def bar():
    pass

class Fuzz(object):
    def __init__(self):
        pass
    
    def buzz(self):
        pass
    
if __name__ == "__main__":
    pass

在运行 pyflowchart 时,提供指定流程图起点的功能。比如,通过一个 -f 来指定画代码中哪个方法的流程图:

$ python3 -m pyflowchart example.py -f bar
$ python3 -m pyflowchart example.py -f Fuzz.buzz
$ python3 -m pyflowchart example.py --main

作为一种特殊情况,允许解析 if __name__ == "__main__": 下的代码。


@xxcdd 你需要的是这样的功能吗?

from pyflowchart.

xxcdd avatar xxcdd commented on May 14, 2024

是的,这样最好了,还有个需求是可以输出个流程图的html文件不,坐等大佬的更新

from pyflowchart.

cdfmlr avatar cdfmlr commented on May 14, 2024

可以考虑,不过我最近比较忙,预计下个月才能开始这些改进。

作为临时代替,你可以先手动剥离出需要画流程图的方法,单独放入一个文件中调用 pyflowchart。

from pyflowchart.

cdfmlr avatar cdfmlr commented on May 14, 2024

这个在新发布的 v0.1.0 版本中已经支持了🎉,更新之后就可以指定类中方法的流程解析。

$ pip3 install -U pyflowchart

具体用法请参考 README

感谢 @xxcdd 提出的建议,也欢迎继续支持本项目。🙏

from pyflowchart.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.