phaethon / kamene

Network packet and pcap file crafting/sniffing/manipulation/visualization security tool. Originally forked from scapy in 2015 and providing python3 compatibility since then.
GNU General Public License v2.0
868 stars 191 forks source link

How to hide warnings? #225

Open taoxinyi opened 6 years ago

taoxinyi commented 6 years ago

WARNING: can't import layer can: No module named 'fcntl' WARNING: Unless called manually, this could indicate deprecated use. Should be changed to bytes(self) WARNING: more Unless called manually, this could indicate deprecated use. Should be changed to bytes(self)

How to hide and suppress such warnings?

GhostofGoes commented 6 years ago
import warnings
warnings.simplefilter("ignore")

Or when you run Python: python -W ignore script.py

Source

Many libraries make use of this module, so if you're shipping a user-facing terminal app it's useful to disable them unless you're debugging.

gpotter2 commented 6 years ago

Hi !

This issue has been resolved on the original scapy fork, which now supports Python 3 ! This fork (scapy3k) is missing many updates, bug fixes and tweaks. You can have a look at https://github.com/secdev/scapy to get more support !

Have a good day

GhostofGoes commented 6 years ago

The original does not yet support Python 3 in the full release, only the release candidates AFAIK.

phaethon commented 6 years ago

Dear @gpotter2 could you provide a patch or point to specific commit? For the people valuing code tested in production for 2+ years over release candidate.

GhostofGoes commented 6 years ago

@gpotter2 Please don't post the same copy-paste comment in every issue on this repo. If the information is relevant to all, open a separate issue. The rc branch isn't done magical cure-all for every bug in this fork, unless I'm mistaken.

And apologies on posting comments unrelated to the issue. Didn't know where else I should address the comment spam that filled my motivations this evening.