0 votes
1 view
in Python by (14.5k points)

I am working with code that throws a lot of (for me at the moment) useless warnings using the warnings library. Reading (scanning) the documentation I only found a way to disable warnings for single functions. But I don't want to change so much of the code.

Is there maybe a flag like python -no-warning foo.py?

What would you recommend?

1 Answer

0 votes
by (32.1k points)

To disable python warning you can use the -W option below is the following command:-

python -W ignore foo.py