Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Python漂亮打印库_Javascript_Python - Fatal编程技术网

Javascript Python漂亮打印库

Javascript Python漂亮打印库,javascript,python,Javascript,Python,有没有一个很好的库可以在javascript中打印Python,有了它,我可以直接将Python代码放到div中,而Pretty print正在使用javascript 我在谷歌上搜索过它,在其他语言中找到了它,但在Python中找不到任何好的 请帮忙。退房 例如: <html> <head> <script type="text/javascript" src="shCore.js"></script> <script ty

有没有一个很好的库可以在javascript中打印Python,有了它,我可以直接将Python代码放到div中,而Pretty print正在使用javascript

我在谷歌上搜索过它,在其他语言中找到了它,但在Python中找不到任何好的

请帮忙。

退房

例如:

<html>
<head>
    <script type="text/javascript" src="shCore.js"></script>
    <script type="text/javascript" src="shBrushPython.js"></script>
    <link type="text/css" href="shCore.css" rel="stylesheet" />
    <link type="text/css" href="shThemeDefault.css" rel="stylesheet" />
</head>
<body>

<pre class='brush: python'>
#!/usr/bin/env python

def hello(txt):
    print('Hello %s!' % txt)

if __name__ == '__main__':
    hello()
</pre>

<script type="text/javascript">
     SyntaxHighlighter.all()
</script>

</body>
</html>

#!/usr/bin/env python
def hello(txt):
打印('Hello%s!'%txt)
如果uuuu name uuuuuu='\uuuuuuu main\uuuuuuu':
你好()
SyntaxHighlighter.all()

Python天生漂亮——不需要漂亮的打印。说真的,我也没找到。我想你要么不写,要么自己写,也许是基于python或者??