title: suppress scapy warning message when importing the module
body: <p>I'm writing a small script, that gathers some information using scapy and then returns some xml code, that I'll pass on to the xmlrpc interface of metasploit. I'd like it that my script only returns xml, and no additional warnings etc.</p>
  
  <p>I can suppress most scapy output, with adding the option <code>verbose=0</code> to my sr1 command. What I still get before every output, and I assume it returns this warning when I'm loading the module, is:</p>
  
  <blockquote>
    <p>WARNING: No route found for IPv6 destination :: (no default route?)</p>
  </blockquote>
  
  <p>I can easily redirect that output, by calling my script like this:</p>
  
  <pre><code> ./myscript 2&gt; /dev/null
  </code></pre>
  
  <p>but I'd like to incorporate this into the script. For that I've found a hint, that one could have a NullDevice class, that doesn't write anything, and then set <code>sys.stderr</code> to an instantiation of that NullDevice class.</p>
  
  <p>This only works unfortunately after I've already loaded the module, so I still have the Warning, and it only redirects any following messages sent to stderr.</p>
  
  <p>How can I suppress that warning message to appear on my screen?</p>