Skip to content

.build() prints to stdout. Makes capturing output difficult. #24

@bac

Description

@bac

The flowsynth build method on Model prints summary information to sys.stdout. It is awkward to actually get that output if you want to do something with it, e.g.

    # Flowsynth prints summary information directly to stdout. We must temporarily
    # redirect stdout in order to capture it.
    temp_stdout = io.StringIO()
    with contextlib.redirect_stdout(temp_stdout):
        fs_model.build()
    output = temp_stdout.getvalue()

It would be much more usable if the build method returned that data as a string. When flowsynth is called from the command-line it could simply print the results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions