Suddenly cannot open local .py files (Python source files) as plain text in Firefox

Not that many people seem to care, but just in case, for someone in the future …

When I didn’t find a solution to the above, I decided the least painful way to deal with the problem was to go into Settings > Applications in Firefox, and associate PY files with Emacs. So, now when I click a link to one of my local .py files, an Emacs window pops up, with that file in it.

Due to a typo a couple of days ago, I discovered another workaround: in the URL for the file, just append a dot, and then the proper file will open in the browser, as a plain text file, which is all I ever wanted. (Well, not all.) That is, this line in an HTML file will cause the file to open in a pop-up Emacs window …

<a href="file:///c:/some-dir/example.py">example.py</a>

… but this will open the same file, right in the browser (note the dot after the .py extension):

<a href="file:///c:/some-dir/example.py">example.py.</a>