itisrazza / pybledom

Python library for controlling BLEDOM devices
https://pypi.org/project/bledom/
MIT License
10 stars 3 forks source link

Verbose modes #4

Open Ispir-Mihai opened 1 year ago

Ispir-Mihai commented 1 year ago

Any idea how to stop the program from being verbose? If there is no solution maybe add this in a future update? 😄

NasiriMohsen commented 3 weeks ago

Any idea how to stop the program from being verbose? If there is no solution maybe add this in a future update? 😄

Hi there, I was looking for the same option and I found workaround, using contextlib you can disable the print function. for example:

import contextlib

with contextlib.redirect_stdout(None):
    await device.set_color(red, green, blue)
    await device.set_brightness(brightness)

This way the verbose wont be printed. Hope this helps you too. 😉