拿Pygments做了个在线代码着色工具

View: New views
16 Messages — Rating Filter:   Alert me  

拿Pygments做了个在线代码着色工具

by realfun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by 1234-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
不错 不错~~  呵呵

在08-1-25,realfun <realfun@...> 写道:
http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to   python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese


_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by Ken-135 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

着色的处理由js来实现比较好.

2008/1/25 realfun <realfun@...>:
http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
http://del.icio.us/iexper
http://twitter.com/qichangxing
http://webpy.org
http://blog.hi0791.com (build with web.py)
http://www.baicai.com 百才招聘
Gtalk: iexper(at)gmail.com


_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by A.TNG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

实现方式就是 给关键字加颜色么?
或者做了其他的工作,例如代码缩进。

2008/1/25 realfun <realfun@...>:
http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
Best Regard,
Tang, Jiyu (Joey)
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by realfun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
不是很清楚啊,Pygments做的,我连看都没看//blush

在08-1-25,Joey <tang.jiyu@...> 写道:
实现方式就是 给关键字加颜色么?
或者做了其他的工作,例如代码缩进。

2008/1/25 realfun <realfun@...>:
http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
Best Regard,
Tang, Jiyu (Joey)

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to   python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
http://www.2maomao.com/blog
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by Zoom.Quiet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/1/25 realfun <realfun@...>:
> http://www.peerat.com/code/
> 基于 Python CGI + Pygments 制作
>
sooo cool 具体的如何的?有代码可以分享否?

> 初学web编程和CGI,保存数据库和加行号选项什么的还没做
>
> BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?
>
> --
> http://www.2maomao.com/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese@...
> Subscribe: send subscribe to python-chinese-request@...
> Unsubscribe: send unsubscribe to  python-chinese-request@...
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



--
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
'''http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by A.TNG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

恩,Python的优点一览无余。 :)


 
2008/1/25 realfun <realfun@...>:
不是很清楚啊,Pygments做的,我连看都没看//blush

在08-1-25,Joey <tang.jiyu@...> 写道:
实现方式就是 给关键字加颜色么?
或者做了其他的工作,例如代码缩进。

2008/1/25 realfun <realfun@...>:
http://www.peerat.com/code/
基于 Python CGI + Pygments 制作

初学web编程和CGI,保存数据库和加行号选项什么的还没做

BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?

--
http://www.2maomao.com/blog

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
Best Regard,
Tang, Jiyu (Joey)

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to   python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
Best Regard,
Tang, Jiyu (Joey)
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by realfun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pygments封装的很好,所以我的代码很简单,只是input/output
这里是目前的代码:http://www.peerat.com/code/syntax.src.txt

在08-1-25, Zoom. Quiet <zoom.quiet@...> 写道:
2008/1/25 realfun <realfun@...>:
> http://www.peerat.com/code/
> 基于 Python CGI + Pygments 制作
>
sooo cool 具体的如何的?有代码可以分享否?

> 初学web编程和CGI,保存数据库和加行号选项什么的还没做
>
> BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?
>
> --
> http://www.2maomao.com/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese@...
> Subscribe: send subscribe to python-chinese-request@...
> Unsubscribe: send unsubscribe to  python-chinese-request@...
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



--
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
'''http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
http://www.2maomao.com/blog
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by Zoom.Quiet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/1/25 realfun <realfun@...>:
> Pygments封装的很好,所以我的代码很简单,只是input/output
> 这里是目前的代码:http://www.peerat.com/code/syntax.src.txt
>
就 一个脚本? Pythonic!
收藏了:
http://wiki.woodpecker.org.cn/moin/MicroProj/2008-01-25

> 在08-1-25, Zoom. Quiet <zoom.quiet@...> 写道:
>
> > 2008/1/25 realfun <realfun@...>:
> > > http://www.peerat.com/code/
> > > 基于 Python CGI + Pygments 制作
> > >
> > sooo cool 具体的如何的?有代码可以分享否?
> >
> > > 初学web编程和CGI,保存数据库和加行号选项什么的还没做
> > >
> > > BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?
> > >
> > > --
> > > http://www.2maomao.com/blog
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese@...
> > > Subscribe: send subscribe to python-chinese-request@...
> > > Unsubscribe: send unsubscribe to  python-chinese-request@...
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >
> >
> >
> > --
> > '''Time is unimportant, only life important!
> > 过程改进乃是开始催生可促生靠谱的人的组织!
> > '''http://zoomquiet.org
> > 博 @ http://blog.zoomquiet.org/pyblosxom/
> > 维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
> > 豆 @ http://www.douban.com/people/zoomq/
> > 看 @ http://zoomq.haokanbu.com/
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
> > Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
> > You can get the truely Freedom 4 software.
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese@...
> > Subscribe: send subscribe to python-chinese-request@...
> > Unsubscribe: send unsubscribe to  python-chinese-request@...
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
>
> --
> http://www.2maomao.com/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese@...
> Subscribe: send subscribe to python-chinese-request@...
> Unsubscribe: send unsubscribe to  python-chinese-request@...
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



--
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
'''http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by A.TNG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

哈哈
 
能简单解释一下 Pythonic的含义么?


 
2008/1/25 Zoom. Quiet <zoom.quiet@...>:
2008/1/25 realfun <realfun@...>:
> Pygments封装的很好,所以我的代码很简单,只是input/output
> 这里是目前的代码:http://www.peerat.com/code/syntax.src.txt
>
就 一个脚本? Pythonic!
收藏了:
http://wiki.woodpecker.org.cn/moin/MicroProj/2008-01-25
> 在08-1-25, Zoom. Quiet <zoom.quiet@...> 写道:

>
> > 2008/1/25 realfun <realfun@... >:
> > > http://www.peerat.com/code/
> > > 基于 Python CGI + Pygments 制作
> > >
> > sooo cool 具体的如何的?有代码可以分享否?
> >
> > > 初学web编程和CGI,保存数据库和加行号选项什么的还没做
> > >
> > > BTW: 有谁知道bluehost上怎么用fastcgi和mode_python吗?
> > >
> > > --
> > > http://www.2maomao.com/blog
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese@...
> > > Subscribe: send subscribe to python-chinese-request@...
> > > Unsubscribe: send unsubscribe to  python-chinese-request@...
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >

> >
> >
> > --
> > '''Time is unimportant, only life important!
> > 过程改进乃是开始催生可促生靠谱的人的组织!
> > ''' http://zoomquiet.org
> > 博 @ http://blog.zoomquiet.org/pyblosxom/
> > 维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
> > 豆 @ http://www.douban.com/people/zoomq/
> > 看 @ http://zoomq.haokanbu.com/
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
> > Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
> > You can get the truely Freedom 4 software.
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese@...
> > Subscribe: send subscribe to python-chinese-request@...
> > Unsubscribe: send unsubscribe to  python-chinese-request@...
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
>
> --
> http://www.2maomao.com/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese@...
> Subscribe: send subscribe to python-chinese-request@...
> Unsubscribe: send unsubscribe to  python-chinese-request@...
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



--
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
''' http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
Best Regard,
Tang, Jiyu (Joey)
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by XiaQ-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/1/25 Joey <tang.jiyu@...>:
> 哈哈
>
> 能简单解释一下 Pythonic的含义么?
-ic
suf. (形容词词尾)表示"...的","像...的","具有...特性的"

Pythonic 就是 Python 的形容词。
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by zongzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

真不错,学习ING。
 
想看看能否自定义语言关键字什么的。

 
在08-1-25,xiaq <xiaqqaix@...> 写道:
2008/1/25 Joey <tang.jiyu@...>:
> 哈哈
>
> 能简单解释一下 Pythonic的含义么?
-ic
suf. (形容词词尾)表示"...的","像...的","具有...特性的"

Pythonic 就是 Python 的形容词。
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to   python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
行为源自需求,理念成就未来!
blog:http://www.dps4e.com/b/ & http://blog.dps4e.com
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by zongzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
请问,这个能否做成命令行的工具啊?

在08-1-25,zongzi <honghunter@...> 写道:
真不错,学习ING。
 
想看看能否自定义语言关键字什么的。

 
在08-1-25,xiaq <xiaqqaix@...> 写道:
2008/1/25 Joey <tang.jiyu@...>:
> 哈哈
>
> 能简单解释一下 Pythonic的含义么?
-ic
suf. (形容词词尾)表示"...的","像...的","具有...特性的"

Pythonic 就是 Python 的形容词。
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to   python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese



--
行为源自需求,理念成就未来!
blog:http://www.dps4e.com/b/ & http://blog.dps4e.com



--
行为源自需求,理念成就未来!
blog: http://www.dps4e.com/b/ & http://blog.dps4e.com
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to  python-chinese-request@...
Detail Info: http://python.cn/mailman/listinfo/python-chinese

Re: 拿Pygments做了个在线代码着色工具

by Jiahua Huang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

什么啊, python-pygments 自己就带了 /usr/bin/pygmentize 这个命令行工具

2008/1/26 zongzi <honghunter@...>:
> 请问,这个能否做成命令行的工具啊?
>
>
_______________________________________________
python-chinese
Post: send python-chinese@...
Subscribe: send subscribe to python-chinese-request@...
Unsubscribe: send unsubscribe to