pythonpyftpdlib

pyftpdlib module has built-in printing, is there a way to disable this?


I'm using pyftpdlib on python 2.7 as a function that I call from the code. The function is the basic example the pyftpdlib creators has to offer.

The thing is, the module has built-in printings that I want to disable, or at least make them not visible to the user, WITHOUT modifying the module itself.

Help? Anyone?

Thanks in advance, Miri :)


Solution

  • pyftpdlib has no print()s. What you see on screen is printed via the logging module. If you want to print ERROR messages only do this before serve_forever():

    import logging
    from pyftpdlib.log import config_logging
    config_logging(level=logging.ERROR)