title: Issues with Scapy not working in script
body: <p>I have installed Scapy on my OS 10.11.5 machine and have been playing around with it in the interactive mode while reading through some of the tutorials on their site (<a href="http://www.secdev.org/projects/scapy/doc/index.html" rel="nofollow">http://www.secdev.org/projects/scapy/doc/index.html</a>) and it's working just fine.</p>
  
  <p>I can run <code>sudo scapy</code> and then run the <code>sniff(count=5)</code> command and all works fine; it does a nice and pretty job printing the contents with <code>_.show()</code>. All works, except a weird message:</p>
  
  <p><code>WARNING: __del__: don't know how to close the file descriptor. Bugs ahead ! Please report this bug.</code></p>
  
  <p>But that's neither here nor there as all things work to properly play with the packets (I haven't tested sending anything while watching in Wireshark, but I guess that's a topic for another time).</p>
  
  <p>Now... When I try to do the following code in a <code>.py</code> file, I get all kinds of issues:</p>
  
  <pre><code>#!/usr/bin/python
  
  from scapy.all import *
  
  def packet_calback(packet):
      print packet.show()
  
  
  sniff(store=0, prn=packet_callback)
  </code></pre>
  
  <p>with a <code>sudo scapy.py</code>, I get the follow traceback:</p>
  
  <pre><code>#:./scapy.py 
  Traceback (most recent call last):
    File "./scapy.py", line 3, in &lt;module&gt;
      from scapy.all import *
    File "/Users/myuser/Desktop/scapy.py", line 3, in &lt;module&gt;
      from scapy.all import *
  ImportError: No module named all
  </code></pre>
  
  <p>From what I see in the docs, this is the preferred method to getting it to work, but it doesn't here... </p>
  
  <p>I have tried <code>import scapy</code> and then <code>scapy.sniff(...)</code> and <code>scapy.all.sniff(...)</code> but those don't work either.</p>
  
  <p>Just for officialness:</p>
  
  <pre><code>$which python
  /usr/local/bin/python
  
  $python --version
  Python 2.7.11
  
  $/usr/bin/python --version
  Python 2.7.10
  </code></pre>
  
  <p>I guess I also have 2 versions of Python installed.... But the same issues happen with both installs.</p>
  
  <p>Help! Please?</p>