Các câu trả lời gần đây cho Suddenly cannot open local .py files (Python source files) as plain texthttps://support.mozilla.org/vi/questions/13458802021-12-24T06:10:49-08:00Thanks for your response, @Seburo, but I would not say that my original problem is solved. I have c2021-12-24T06:10:49-08:00bjkeefehttps://support.mozilla.org/vi/questions/1345880#answer-1468928<p>Thanks for your response, @Seburo, but I would not say that my original problem is solved. I have come up with two workarounds, and practically speaking, both eliminate most of the pain. But I still would, ideally, like to be able to have a local Python source file open as a plain text file in my browser. I would also like to understand what is going on under the hood of Firefox that prevents me from doing this.
</p><p>So, no urgency. But if you have some ideas, I'd be glad to hear them.
</p>Hi
I am sorry we were not able to look at this issue sooner, but I am glad to hear that you have fou2021-12-24T04:10:37-08:00plwthttps://support.mozilla.org/vi/questions/1345880#answer-1468908<p>Hi
</p><p>I am sorry we were not able to look at this issue sooner, but I am glad to hear that you have found a solution to this.
</p>Not that many people seem to care, but just in case, for someone in the future …
When I didn’t find 2021-12-24T03:41:00-08:00bjkeefehttps://support.mozilla.org/vi/questions/1345880#answer-1468905<p>Not that many people seem to care, but just in case, for someone in the future …
</p><p>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 &gt; 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.
</p><p>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 …
</p><p>&lt;a href="file:///c:/some-dir/<a href="http://example.py" rel="nofollow">example.py</a>"&gt;<a href="http://example.py" rel="nofollow">example.py</a>&lt;/a&gt;
</p><p>… but this will open the same file, right in the browser (note the dot after the .py extension):
</p><p>&lt;a href="file:///c:/some-dir/<a href="http://example.py" rel="nofollow">example.py</a>"&gt;<a href="http://example.py" rel="nofollow">example.py</a>.&lt;/a&gt;
</p>