We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
With a colleague of mine we experienced an issue with print_result.
When we import the function in a script and use the standard print function, unwanted characters appear.
After debugging the cause, we found that the init function of colorama library is set in the print_result.py file but no deinit.
Bellow we highlighted the problem.
$ cat scripts/test1.py #!/usr/bin/env python3 if __name__ == "__main__": print("hello, world") $ poetry run scripts/test1.py | hexdump -C 00000000 68 65 6c 6c 6f 2c 20 77 6f 72 6c 64 0a |hello, world.| 0000000d # reproducing code $ cat scripts/test2.py #!/usr/bin/env python3 from nornir_utils.plugins.functions.print_result import print_result if __name__ == "__main__": print("hello, world") $ poetry run scripts/test2.py | hexdump -C 00000000 68 65 6c 6c 6f 2c 20 77 6f 72 6c 64 1b 5b 30 6d |hello, world.[0m| 00000010 0a 1b 5b 30 6d |..[0m| 00000015``` I will propose a fix in a PR.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
With a colleague of mine we experienced an issue with print_result.
When we import the function in a script and use the standard print function, unwanted characters appear.
After debugging the cause, we found that the init function of colorama library is set in the print_result.py file but no deinit.
Bellow we highlighted the problem.
The text was updated successfully, but these errors were encountered: