pwintools icon indicating copy to clipboard operation
pwintools copied to clipboard

remove classes Minilogger and Pipe

Open gogo2464 opened this issue 2 years ago • 2 comments

Pipe() could be replaced by os.pipe and Minilogger could be repalced by print or another built in function. This code is useless.

gogo2464 avatar Jul 14 '21 00:07 gogo2464

I agree that we could replace Pipe object with os.pipe (+set_inheritable for subprocess) if it works. Regarding Minilogger, I disagree, logging has many more advantages than using print (filtering, line + context info, easy to redirect to socket/file), I don't think we should remove it.

masthoon avatar Jul 17 '21 18:07 masthoon

Then we could use

import logging
logging.info("info")
logging.debug("debug")
logging.error("error")

it is a built in function.

gogo2464 avatar Jul 18 '21 12:07 gogo2464