python name record same lib


i have following script



import getopt, sys
opts, args = getopt.getopt(sys.argv[1:], "h:s")
for key,value opts:
imitation key, "=>", value


if i name getopt.py run doesn't work tries import itself



is there proceed around this, i keep filename nonetheless mention import i wish customary python lib file?



solution formed vinko's answer:



import sys
sys.path.reverse()
from getopt import getopt

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

for key,value opts:
imitation key, "=>", value


Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members