Is this Python pathfinder efficient enough?
About your code following common practices, you may read about PEP8.

You have far too many lines with more than 80 characters, you even have a line with 180+ characters: Does not fit my screen.

You may, as PEP8 states, put spaces around binary operators. 

You also have an undocumented function with a name that does not helps me.

Seems you have copy/pasted some code many times, that's not DRY, and that may be bad, you may win some readability by using a function.

You should not use this kind of control flow:

for y in xrange(len(w)):
    for x in xrange(len(w[0])):
        if (w[y])[x]==2:
            if hor-1&gt;-1: #going left
                if (w[ver])[hor-1]==2:


That's freaking unreadable, and I'll NOT read it. Avoid imbricate so many control flow.