Relative import from script with same name as package

Chris Angelico rosuav at gmail.com
Sat Aug 13 20:07:40 EDT 2011


On Sun, Aug 14, 2011 at 12:55 AM, OKB (not okblacke)
<brenNOSPAMbarn at nobrenspambarn.net> wrote:
> sys.path = sys.path[1:] + ['']
>
> (That is, move the current directory to the end of the search path
> instead of the beginning.)
>

Or, equivalently:

sys.path.append(sys.path.pop(0))

ChrisA



More information about the Python-list mailing list