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

How I can 'mute' the annotation like 'connector_log=0x1 1566 0xbb packets parsed' #28

Open
Ares960826 opened this issue Jan 24, 2023 · 2 comments

Comments

@Ares960826
Copy link

Thank you for your development. This is a very nice tool and helps many researcher to conduct related works conveniently.

There is an annotation, when the running code econtering csidata.read(). Uncomfortably, if I want to parse many .dat files, it will output too many annotation in screen.
tmpC66D
At the same time, I try to mute it by the following two methods:
First -

class HiddenPrints:
    def __enter__(self):
        self._original_stdout = sys.stdout
        sys.stdout = open(os.devnull, 'w')

    def __exit__(self, exc_type, exc_val, exc_tb):
        sys.stdout.close()
        sys.stdout = self._original_stdout
... ... ... ...
with HiddenPrints():
    csidata.read()

Second -

os.system('clear')

Please help me out. Thank you again!

@Ares960826
Copy link
Author

These two experiments that I have tried are all not work.

@citysu
Copy link
Owner

citysu commented Jan 24, 2023

Take a look at the docstring in core.py. you can disable the report by setting if_report=False.

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

No branches or pull requests

2 participants