是否有任何python模块采用文本并添加python语法高亮?(Are there any python modules that take text and add python syntax highlighting to it?)
是否有任何python模块,我可以使用谷歌应用程序引擎,采取如下代码串:
<pre> a = 1 while a < 10: print a a += 1 </pre>然后像基本的python编辑器那样为文本着色(或者像堆栈溢出)?
这将突出显示预标签内的内容,并将在线显示。
Are there any python modules that I could use with google app engine that take a string of code like this:
<pre> a = 1 while a < 10: print a a += 1 </pre>and then color the text like a basic python editor would (or like stack overflow)?
This would be highlighting the stuff inside the pre tag and would be displayed online.
最满意答案
你在寻找Pygments 。
[Pygments]是一种通用语法高亮显示器,适用于各种软件,如论坛系统,wiki或其他需要美化源代码的应用程序。
You're looking for Pygments.
[Pygments] is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code.
更多推荐
python,显示,<pre>,电脑培训,计算机培训,IT培训"/> <meta name="descrip
发布评论