资源简介
NULL
博文链接:https://ssh-2009-126-com.iteye.com/blog/715747

代码片段和文件信息
#!/usr/bin/python
# This code is original from jsmin by Douglas Crockford it was translated to
# Python by Baruch Even. The original code had the following copyright and
# license.
#
# /* jsmin.c
# 2007-05-22
#
# Copyright (c) 2002 Douglas Crockford (www.crockford.com)
#
# Permission is hereby granted free of charge to any person obtaining a copy of
# this software and associated documentation files (the “Software“) to deal in
# the Software without restriction including without limitation the rights to
# use copy modify merge publish distribute sublicense and/or sell copies
# of the Software and to permit persons to whom the Software is furnished to do
# so subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# The Software shall be used for Good not Evil.
#
# THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
# IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
# LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# */
from StringIO import StringIO
def jsmin(js):
ins = StringIO(js)
outs = StringIO()
javascriptMinify().minify(ins outs)
str = outs.getvalue()
if len(str) > 0 and str[0] == ‘\n‘:
str = str[1:]
return str
def isAlphanum(c):
“““return true if the character is a letter digit underscore
dollar sign or non-ASCII character.
“““
return ((c >= ‘a‘ and c <= ‘z‘) or (c >= ‘0‘ and c <= ‘9‘) or
(c >= ‘A‘ and c <= ‘Z‘) or c == ‘_‘ or c == ‘$‘ or c == ‘\\‘ or (c is not None and ord(c) > 126));
class UnterminatedComment(Exception):
pass
class UnterminatedStringLiteral(Exception):
pass
class UnterminatedRegularexpression(Exception):
pass
class javascriptMinify(object):
def _outA(self):
self.outstream.write(self.theA)
def _outB(self):
self.outstream.write(self.theB)
def _get(self):
“““return the next character from stdin. Watch out for lookahead. If
the character is a control character translate it to a space or
linefeed.
“““
c = self.theLookahead
self.theLookahead = None
if c == None:
c = self.instream.read(1)
if c >= ‘ ‘ or c == ‘\n‘:
return c
if c == ‘‘: # EOF
return ‘\000‘
if c == ‘\r‘:
return ‘\n‘
return ‘ ‘
def _peek(self):
self.theLookahead = self._get()
return self.theLookahead
def _next(self):
“““get the next charact
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-07-16 18:05 firebug
文件 10248 2010-06-25 09:42 firebug\ChangeLog
目录 0 2010-07-16 18:05 firebug\CVS
文件 862 2010-06-25 09:42 firebug\CVS\Entries
文件 19 2010-06-24 11:06 firebug\CVS\Repository
文件 43 2010-06-24 11:06 firebug\CVS\Root
文件 136 2010-06-25 09:42 firebug\deploy
文件 457 2010-06-25 09:42 firebug\errorIcon.png
文件 78968 2010-06-25 09:42 firebug\firebug-lite-compressed.js
文件 16333 2010-06-25 09:42 firebug\firebug-lite.css
文件 107183 2010-06-25 09:42 firebug\firebug-lite.js
文件 1043 2010-06-25 09:42 firebug\firebug.gif
文件 499 2010-06-25 09:42 firebug\firebug_logo.png
文件 524 2010-06-25 09:42 firebug\infoIcon.png
文件 7842 2010-06-25 09:42 firebug\jsmin.py
文件 286 2010-06-25 09:42 firebug\minifier.py
文件 63 2010-06-25 09:42 firebug\minify
文件 63 2010-06-25 09:42 firebug\minify.bat
文件 5203 2010-06-25 09:42 firebug\progress.gif
文件 64 2010-06-25 09:42 firebug\spacer.gif
文件 300 2010-06-25 09:42 firebug\tree_close.gif
文件 202 2010-06-25 09:42 firebug\tree_open.gif
文件 516 2010-06-25 09:42 firebug\warningIcon.png
----------- --------- ---------- ----- ----
230854 23
相关资源
- E4A无障碍跨程序操作类库(带源码、
- 设备管理系统源码
- 安卓wifi直连app源码
- 电信中兴光猫超密获取工具使用方法
- ddos压力测试工具99657
- 商品查询录入工具(e4a.e4a)
- IEEE754 浮点转换工具
- 我的世界源码(易语言版)
- labview编程软件滤波器以及编写程序设
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- Hash1.04(md5校验工具) 绿色免费版
- usb hid调试工具
- Eeupdate.exe
- Alcor(安国)SC908SNAU6989SN主控量产工具
- SD卡,TF卡修复工具 能够恢复SD卡的真
- 局域网硬件信息收集工具
- 抓包工具 sniffer
- VisualStudioUninstaller vs卸载工具
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- Zprotect专业版(无限制) 一机一码E
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- 炬力固件提取工具4.0版
- 农场开发项目
- OCR源码
评论
共有 条评论