[issue6858] This is a python file, apply syntax highlighting

Terry J. Reedy report at bugs.python.org
Mon Aug 2 00:06:40 CEST 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

There are, perhaps 3 main issues with new features;

1. What is the specific proposal?

In particular, where should the new menu entry go and what should it say.

2. Will it hurt anything?
3. Will it be useful.

As to these, I suggest you try your own experiment. Rename x.html to x.py and pull into the editor.

Doing that with controlflow.html shows that this appears to be harmless. For this file, it is also useless:

a. My WinXP32 3.1.2 IDLE edit window does not have a horizontal scroll bar. It does not need one for <80 char lines. It also does not do autowrap, as that would be fatal for code. However, this file has some lines with a few hundred chars and there is no easy way to read them.

b. The html for Python code is not always what you see in a browser. Here is one line from your example: "<span class="k">print</span> <span class="n">x</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>" (no wrapping in the original).

I think Tal's case of .py-less Python files is a reason to add a menu entry, and let the user beware with anything else.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6858>
_______________________________________


More information about the Python-bugs-list mailing list