python name a file same as a lib
<p>i have the following script</p>

<pre><code>import getopt, sys
opts, args = getopt.getopt(sys.argv[1:], "h:s")
for key,value in opts:
    print key, "=&gt;", value
</code></pre>

<p>if i name this getopt.py and run it doesn't work as it tries to import itself</p>

<p>is there a way around this, so i can keep this filename but specify on import that i want the standard python lib and not this file?  </p>

<p>Solution based on Vinko's answer:</p>

<pre><code>import sys
sys.path.reverse()
from getopt import getopt

opts, args = getopt(sys.argv[1:], "h:s")

for key,value in opts:
    print key, "=&gt;", value
</code></pre>
