After ".py", use " ?" (the space is important) to force the search in firefox.
For example, in firefox and chrome ctrl-l will clear the URL bar and put the cursor and focus there to take you to the location you enter, and ctrl-k will do similar but pre-fill the location bar with a preceding '?' so a search is triggered on the input.
These shortcuts have existed for quite a while. They used to just focus the respective separate input boxes, when it wasn't all done through one.
Typing `?bla.py` in the omnibar will perform a search for `bla.py` on both Firefox and Chrome