Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The function Client.wsdl.dump() was modified to allow to put the print output to a file or other stream. #1213

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

renatodamas
Copy link

The function Client.wsdl.dump() was modified to allow to put the print output to a file or other stream.

To the function interface was add a default parameter output=sys.stdout that keeps the current usability and permits flexility to change the output.

close #1212

…t output to a file or other stream.

To the interface of the function was add a default parameter output=sys.stdout that keeps the current usability and permits flexility to change the output.
print("")
print("Prefixes:")
def dump(self, output=sys.stdout):
print("", file=output)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use local redefinition of print to avoid to set multiple file=output:

from functools import partial

print = partial(print, file=output)

print("")
print("Prefixes:")

and file (as used in print) is better than output.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frost-nzcr4 I will performe the changes and submit another pull request.

@renatodamas renatodamas marked this pull request as draft March 31, 2022 01:54
renatodamas added a commit to renatodamas/python-zeep that referenced this pull request Jun 16, 2022
@renatodamas renatodamas marked this pull request as ready for review June 17, 2022 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify Client.wsdl.dump() to allow to put the print output to a file or other stream
2 participants