[b]"How to Run a Python Program with Warnings Without Ignoring Them?"[/b] or [b]"Best Way to Handle Warnings When

20 Replies, 967 Views

If you’re lazy like me, just pipe the output to a file:
```bash
python -W default script.py > output.log 2>&1
```
Now *everything* (including warnings) is in `output.log`.

Not elegant, but works when you python run program with warnings and forget to configure logging.

Messages In This Thread



Users browsing this thread: 1 Guest(s)