some pep8 changes (fixed spacing at end)
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.1.1 (2012-10-19 09:40:10) dev
|
Version 2.1.1 (2012-10-19 10:37:01) dev
|
||||||
|
|||||||
-11
@@ -1,12 +1 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-8
@@ -9,7 +9,11 @@ License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
|||||||
This file is based, although a rewrite, on MIT-licensed code from the Bottle web framework.
|
This file is based, although a rewrite, on MIT-licensed code from the Bottle web framework.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, sys, optparse, urllib
|
import os
|
||||||
|
import sys
|
||||||
|
import optparse
|
||||||
|
import urllib
|
||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
sys.path = [path]+[p for p in sys.path if not p==path]
|
sys.path = [path]+[p for p in sys.path if not p==path]
|
||||||
@@ -217,7 +221,7 @@ def mongrel2_handler(application,conn,debug=False):
|
|||||||
environ['QUERY_STRING'] = environ['URI'].split('?')[1]
|
environ['QUERY_STRING'] = environ['URI'].split('?')[1]
|
||||||
else:
|
else:
|
||||||
environ['QUERY_STRING'] = ''
|
environ['QUERY_STRING'] = ''
|
||||||
if environ.has_key('Content-Length'):
|
if 'Content-Length' in environ:
|
||||||
environ['CONTENT_LENGTH'] = environ['Content-Length'] # necessary for POST to work with Django
|
environ['CONTENT_LENGTH'] = environ['Content-Length'] # necessary for POST to work with Django
|
||||||
environ['wsgi.input'] = req.body
|
environ['wsgi.input'] = req.body
|
||||||
|
|
||||||
@@ -305,9 +309,3 @@ def main():
|
|||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,3 @@ def webapp_add_wsgi_middleware(app):
|
|||||||
from google.appengine.ext.appstats import recording
|
from google.appengine.ext.appstats import recording
|
||||||
app = recording.appstats_wsgi_middleware(app)
|
app = recording.appstats_wsgi_middleware(app)
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,3 @@ def ccache():
|
|||||||
|
|
||||||
return dict(form=form, total=total,
|
return dict(form=form, total=total,
|
||||||
ram=ram, disk=disk, object_stats=hp != False)
|
ram=ram, disk=disk, object_stats=hp != False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -198,5 +198,3 @@ def toggle_breakpoint():
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
session.flash = str(e)
|
session.flash = str(e)
|
||||||
return response.json({'ok': ok, 'lineno': lineno})
|
return response.json({'ok': ok, 'lineno': lineno})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1697,5 +1697,3 @@ def git_push():
|
|||||||
session.flash = T("Push failed, git exited abnormally. See logs for details.")
|
session.flash = T("Push failed, git exited abnormally. See logs for details.")
|
||||||
redirect(URL('site'))
|
redirect(URL('site'))
|
||||||
return dict(app=app,form=form)
|
return dict(app=app,form=form)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,3 @@ def callback():
|
|||||||
except:
|
except:
|
||||||
errors=''
|
errors=''
|
||||||
return (output+errors).replace('\n','<br/>')
|
return (output+errors).replace('\n','<br/>')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,3 @@ def revision():
|
|||||||
desc=ctx.description(),
|
desc=ctx.description(),
|
||||||
form=form
|
form=form
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,4 +58,3 @@ class EXISTS(object):
|
|||||||
if os.path.exists(value):
|
if os.path.exists(value):
|
||||||
return (value,None)
|
return (value,None)
|
||||||
return (value,self.error_message)
|
return (value,self.error_message)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,3 @@ def index():
|
|||||||
|
|
||||||
def about():
|
def about():
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,3 @@ def reset():
|
|||||||
session['commands:'+app] = []
|
session['commands:'+app] = []
|
||||||
session['history:'+app] = gluon.contrib.shell.History()
|
session['history:'+app] = gluon.contrib.shell.History()
|
||||||
return 'done'
|
return 'done'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,3 @@ def profiler():
|
|||||||
size += len(data)
|
size += len(data)
|
||||||
response.cookies[KEY] = size
|
response.cookies[KEY] = size
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,5 +127,3 @@ def detach_debugger():
|
|||||||
def call():
|
def call():
|
||||||
session.forget()
|
session.forget()
|
||||||
return service()
|
return service()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -554,6 +554,3 @@ def call(): return service()
|
|||||||
path = os.path.join(request.folder,'..',app,'databases','*')
|
path = os.path.join(request.folder,'..',app,'databases','*')
|
||||||
for file in glob.glob(path):
|
for file in glob.glob(path):
|
||||||
os.unlink(file)
|
os.unlink(file)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,5 +19,3 @@ for filename in os.listdir(path):
|
|||||||
os.unlink(fullpath)
|
os.unlink(fullpath)
|
||||||
except:
|
except:
|
||||||
logging.exception('failure to check %s'%fullpath)
|
logging.exception('failure to check %s'%fullpath)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,3 @@ PLUGINS_APP = 'http://web2py.com/plugins'
|
|||||||
# set the language
|
# set the language
|
||||||
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
|
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
|
||||||
T.force(request.cookies['adminLanguage'].value)
|
T.force(request.cookies['adminLanguage'].value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,3 @@ from gluon.languages import findT, update_all_languages
|
|||||||
from gluon.myregex import *
|
from gluon.myregex import *
|
||||||
from gluon.restricted import *
|
from gluon.restricted import *
|
||||||
from gluon.compileapp import compile_application, remove_compiled_application
|
from gluon.compileapp import compile_application, remove_compiled_application
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -168,5 +168,3 @@ elif session.authorized and \
|
|||||||
if request.controller=='appadmin' and DEMO_MODE:
|
if request.controller=='appadmin' and DEMO_MODE:
|
||||||
session.flash = 'Appadmin disabled in demo mode'
|
session.flash = 'Appadmin disabled in demo mode'
|
||||||
redirect(URL('default','sites'))
|
redirect(URL('default','sites'))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,3 @@ def helpicon():
|
|||||||
|
|
||||||
def searchbox(elementid):
|
def searchbox(elementid):
|
||||||
return TAG[''](LABEL(IMG(_id="search_start",_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
|
return TAG[''](LABEL(IMG(_id="search_start",_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,3 @@ def is_manager():
|
|||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,3 @@ if os.path.exists('applications/examples'):
|
|||||||
response.menu.append((T('Help'), False, URL('examples','default','index')))
|
response.menu.append((T('Help'), False, URL('examples','default','index')))
|
||||||
else:
|
else:
|
||||||
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
response.files.append(URL('static','plugin_multiselect/jquery.multi-select.js'))
|
response.files.append(URL('static','plugin_multiselect/jquery.multi-select.js'))
|
||||||
response.files.append(URL('static','plugin_multiselect/multi-select.css'))
|
response.files.append(URL('static','plugin_multiselect/multi-select.css'))
|
||||||
response.files.append(URL('static','plugin_multiselect/start.js'))
|
response.files.append(URL('static','plugin_multiselect/start.js'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,3 @@ def flash():
|
|||||||
|
|
||||||
def fade():
|
def fade():
|
||||||
return dict()
|
return dict()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,3 @@ def ccache():
|
|||||||
|
|
||||||
return dict(form=form, total=total,
|
return dict(form=form, total=total,
|
||||||
ram=ram, disk=disk, object_stats=hp != False)
|
ram=ram, disk=disk, object_stats=hp != False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
@@ -47,6 +46,3 @@ def cache_controller_and_view():
|
|||||||
t = time.ctime()
|
t = time.ctime()
|
||||||
d = dict(time=t, link=A('click to reload', _href=URL(r=request)))
|
d = dict(time=t, link=A('click to reload', _href=URL(r=request)))
|
||||||
return response.render(d)
|
return response.render(d)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,5 +73,3 @@ def changelog():
|
|||||||
import os
|
import os
|
||||||
filename = os.path.join(request.env.gluon_parent, 'CHANGELOG')
|
filename = os.path.join(request.env.gluon_parent, 'CHANGELOG')
|
||||||
return response.render(dict(changelog=MARKMIN(read_file(filename))))
|
return response.render(dict(changelog=MARKMIN(read_file(filename))))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def form():
|
def form():
|
||||||
""" a simple entry form with various types of objects """
|
""" a simple entry form with various types of objects """
|
||||||
|
|
||||||
@@ -23,7 +20,3 @@ def form():
|
|||||||
else:
|
else:
|
||||||
response.flash = 'please fill the form'
|
response.flash = 'please fill the form'
|
||||||
return dict(form=form, vars=form.vars)
|
return dict(form=form, vars=form.vars)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
session.forget()
|
session.forget()
|
||||||
|
|
||||||
response.menu = [['home', False, '/%s/default/index'
|
response.menu = [['home', False, '/%s/default/index'
|
||||||
@@ -77,7 +76,3 @@ def vars():
|
|||||||
doc=doc,
|
doc=doc,
|
||||||
attributes=attributes,
|
attributes=attributes,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,3 @@ def basic():
|
|||||||
['basic', True, URL('basic')]]
|
['basic', True, URL('basic')]]
|
||||||
response.flash = 'you clicked on basic'
|
response.flash = 'you clicked on basic'
|
||||||
return dict(message='you clicked on basic')
|
return dict(message='you clicked on basic')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def counter():
|
def counter():
|
||||||
""" every time you reload, it increases the session.counter """
|
""" every time you reload, it increases the session.counter """
|
||||||
|
|
||||||
@@ -8,7 +5,3 @@ def counter():
|
|||||||
session.counter = 0
|
session.counter = 0
|
||||||
session.counter += 1
|
session.counter += 1
|
||||||
return dict(counter=session.counter)
|
return dict(counter=session.counter)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -137,5 +137,3 @@ Quoted text
|
|||||||
|
|
||||||
def ajaxwiki_onclick():
|
def ajaxwiki_onclick():
|
||||||
return MARKMIN(request.vars.text).xml()
|
return MARKMIN(request.vars.text).xml()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,3 @@ def index():
|
|||||||
sheet = cache.ram('sheet1',lambda:Sheet(10,10,URL('callback')),0)
|
sheet = cache.ram('sheet1',lambda:Sheet(10,10,URL('callback')),0)
|
||||||
#sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True)
|
#sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True)
|
||||||
return dict(sheet=sheet)
|
return dict(sheet=sheet)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def variables():
|
def variables():
|
||||||
return dict(a=10, b=20)
|
return dict(a=10, b=20)
|
||||||
|
|
||||||
@@ -31,7 +28,3 @@ def xml():
|
|||||||
|
|
||||||
def beautify():
|
def beautify():
|
||||||
return dict(message=BEAUTIFY(request))
|
return dict(message=BEAUTIFY(request))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
def group_feed_reader(group,mode='div',counter='5'):
|
def group_feed_reader(group,mode='div',counter='5'):
|
||||||
"""parse group feeds"""
|
"""parse group feeds"""
|
||||||
|
|
||||||
@@ -43,8 +42,3 @@ def code_feed_reader(project,mode='div'):
|
|||||||
|
|
||||||
|
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,5 +37,3 @@ def get_content(b=None,\
|
|||||||
openedfile.close()
|
openedfile.close()
|
||||||
|
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,5 +42,3 @@ def toggle_menuclass(cssclass='pressed',menuid='headermenu'):
|
|||||||
return XML(jscript)
|
return XML(jscript)
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,3 @@ def ccache():
|
|||||||
|
|
||||||
return dict(form=form, total=total,
|
return dict(form=form, total=total,
|
||||||
ram=ram, disk=disk, object_stats=hp != False)
|
ram=ram, disk=disk, object_stats=hp != False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,4 +71,3 @@ def data():
|
|||||||
LOAD('default','data.load',args='tables',ajax=True,user_signature=True)
|
LOAD('default','data.load',args='tables',ajax=True,user_signature=True)
|
||||||
"""
|
"""
|
||||||
return dict(form=crud())
|
return dict(form=crud())
|
||||||
|
|
||||||
|
|||||||
@@ -81,4 +81,3 @@ use_janrain(auth,filename='private/janrain.key')
|
|||||||
|
|
||||||
## after defining tables, uncomment below to enable auditing
|
## after defining tables, uncomment below to enable auditing
|
||||||
# auth.enable_record_versioning(db)
|
# auth.enable_record_versioning(db)
|
||||||
|
|
||||||
|
|||||||
@@ -98,5 +98,3 @@ def _():
|
|||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
_()
|
_()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,4 +37,3 @@ routers = {
|
|||||||
#NOTE! To change language in your application using these rules add this line
|
#NOTE! To change language in your application using these rules add this line
|
||||||
#in one of your models files:
|
#in one of your models files:
|
||||||
# if request.uri_language: T.force(request.uri_language)
|
# if request.uri_language: T.force(request.uri_language)
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,3 @@ sys.path = [path]+[p for p in sys.path if not p==path]
|
|||||||
import gluon.main
|
import gluon.main
|
||||||
|
|
||||||
wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase)
|
wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,3 @@ if SOFTCRON:
|
|||||||
global_settings.web2py_crontype = 'soft'
|
global_settings.web2py_crontype = 'soft'
|
||||||
|
|
||||||
fcgi.WSGIServer(application, bindAddress='/tmp/fcgi.sock').run()
|
fcgi.WSGIServer(application, bindAddress='/tmp/fcgi.sock').run()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -97,9 +97,3 @@ def main():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,15 +42,3 @@ if 0:
|
|||||||
mail = Mail()
|
mail = Mail()
|
||||||
service = Service()
|
service = Service()
|
||||||
plugins = PluginManager()
|
plugins = PluginManager()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -474,11 +474,3 @@ def create_missing_app_folders(request):
|
|||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
global_settings.app_folders.add(request.folder)
|
global_settings.app_folders.add(request.folder)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -489,7 +489,3 @@ def lazy_cache(key=None,time_expire=None,cache_model='ram'):
|
|||||||
g.__name__ = f.__name__
|
g.__name__ = f.__name__
|
||||||
return g
|
return g
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,3 @@ def getcfs(key, filename, filter=None):
|
|||||||
cfs[key] = (t, data)
|
cfs[key] = (t, data)
|
||||||
cfs_lock.release()
|
cfs_lock.release()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -700,11 +700,3 @@ def test():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -717,11 +717,3 @@ def contenttype(filename, default='text/plain'):
|
|||||||
if default.startswith('text/'):
|
if default.startswith('text/'):
|
||||||
default += '; charset=utf-8'
|
default += '; charset=utf-8'
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -257,11 +257,3 @@ def test():
|
|||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -237,11 +237,3 @@ def test():
|
|||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -500,6 +500,3 @@ aes_Rcon = array('B',
|
|||||||
'c697356ad4b37dfaefc5913972e4d3bd'
|
'c697356ad4b37dfaefc5913972e4d3bd'
|
||||||
'61c29f254a943366cc831d3a74e8cb'.decode('hex')
|
'61c29f254a943366cc831d3a74e8cb'.decode('hex')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,3 @@ if __name__=="__main__":
|
|||||||
print expand_html(open(sys.argv[1]).read())
|
print expand_html(open(sys.argv[1]).read())
|
||||||
else:
|
else:
|
||||||
print test()
|
print test()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3905,10 +3905,3 @@ def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, refer
|
|||||||
result['version'] = result['version'] or feedparser.version
|
result['version'] = result['version'] or feedparser.version
|
||||||
result['namespaces'] = feedparser.namespacesInUse
|
result['namespaces'] = feedparser.namespacesInUse
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,4 +65,3 @@ class MemcacheClient(object):
|
|||||||
|
|
||||||
def flush_all(self,*a,**b):
|
def flush_all(self,*a,**b):
|
||||||
return self.client.delete(*a,**b)
|
return self.client.delete(*a,**b)
|
||||||
|
|
||||||
|
|||||||
@@ -84,11 +84,3 @@ def autoretry_datastore_timeouts(attempts=5.0, interval=0.1, exponent=2.0):
|
|||||||
setattr(wrapper, '_autoretry_datastore_timeouts', False)
|
setattr(wrapper, '_autoretry_datastore_timeouts', False)
|
||||||
if getattr(wrapped, '_autoretry_datastore_timeouts', True):
|
if getattr(wrapped, '_autoretry_datastore_timeouts', True):
|
||||||
apiproxy_stub_map.MakeSyncCall = wrapper
|
apiproxy_stub_map.MakeSyncCall = wrapper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,11 +61,3 @@ def pdf_from_html(html):
|
|||||||
return pdflatex_from_html(html)
|
return pdflatex_from_html(html)
|
||||||
else:
|
else:
|
||||||
return pyfpdf_from_html(html)
|
return pyfpdf_from_html(html)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,3 @@ def button(merchant_id="123456789012345",
|
|||||||
list_products += t % dict(k=k+1,key=key,value=value)
|
list_products += t % dict(k=k+1,key=key,value=value)
|
||||||
button = '<form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/%s" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top">%s<input name="_charset_" type="hidden" value="utf-8"/><input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=%s&w=117&h=48&style=white&variant=text&loc=en_US" type="image"/></form>' % (merchant_id, list_products, merchant_id)
|
button = '<form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/%s" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top">%s<input name="_charset_" type="hidden" value="utf-8"/><input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=%s&w=117&h=48&style=white&variant=text&loc=en_US" type="image"/></form>' % (merchant_id, list_products, merchant_id)
|
||||||
return XML(button)
|
return XML(button)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,3 @@
|
|||||||
__all__ = ['DAL','Field','drivers','gae']
|
__all__ = ['DAL','Field','drivers','gae']
|
||||||
|
|
||||||
from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType, gae
|
from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType, gae
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,3 @@ def THUMB(image, nx=120, ny=120, gae=False, name='thumb'):
|
|||||||
return thumb
|
return thumb
|
||||||
else:
|
else:
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -905,11 +905,3 @@ SQLStorage = DALStorage
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -121,11 +121,3 @@ def authenticate(username, password, service='login'):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import getpass
|
import getpass
|
||||||
print authenticate(getpass.getuser(), getpass.getpass())
|
print authenticate(getpass.getuser(), getpass.getpass())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,3 @@ def test():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test()
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -165,11 +165,3 @@ if __name__ == '__main__':
|
|||||||
ell=Learner()
|
ell=Learner()
|
||||||
ell.loadd(eval(IUP))
|
ell.loadd(eval(IUP))
|
||||||
print ell.generate(1000,prefix=None)
|
print ell.generate(1000,prefix=None)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,3 @@ from fpdf import *
|
|||||||
|
|
||||||
# import warnings
|
# import warnings
|
||||||
# warnings.warn("pyfpdf package name is deprecated, please use fpdf instead")
|
# warnings.warn("pyfpdf package name is deprecated, please use fpdf instead")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -961,8 +961,3 @@ if __name__ == '__main__':
|
|||||||
# reimport as global __main__ namespace is destroyed
|
# reimport as global __main__ namespace is destroyed
|
||||||
import qdb
|
import qdb
|
||||||
qdb.main(**kwargs)
|
qdb.main(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,9 +163,3 @@ class RedisClient(object):
|
|||||||
def __keyFormat__(self, key):
|
def __keyFormat__(self, key):
|
||||||
return 'w2p:%s:%s' % (self.request.application,
|
return 'w2p:%s:%s' % (self.request.application,
|
||||||
key.replace(' ', '_'))
|
key.replace(' ', '_'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -197,5 +197,3 @@ class RecordDeleter(object):
|
|||||||
self.db.srem(id_idx, self.key)
|
self.db.srem(id_idx, self.key)
|
||||||
#remove the key itself
|
#remove the key itself
|
||||||
self.db.delete(self.key)
|
self.db.delete(self.key)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -586,11 +586,3 @@ def test():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print test()
|
print test()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -264,11 +264,3 @@ def run(history, statement, env={}):
|
|||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
history=History()
|
history=History()
|
||||||
while True: print run(history, raw_input('>>> ')).rstrip()
|
while True: print run(history, raw_input('>>> ')).rstrip()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -148,8 +148,3 @@ if __name__ == "__main__":
|
|||||||
location = "http://www.web2py.com.ar/webservices/sample/call/jsonrpc"
|
location = "http://www.web2py.com.ar/webservices/sample/call/jsonrpc"
|
||||||
client = ServerProxy(location, verbose='--verbose' in sys.argv,)
|
client = ServerProxy(location, verbose='--verbose' in sys.argv,)
|
||||||
print client.add(1, 2)
|
print client.add(1, 2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,11 +110,3 @@ def sms_email(number,provider):
|
|||||||
elif number[:2]=='00': number=number[3:]
|
elif number[:2]=='00': number=number[3:]
|
||||||
number=re.sub('[^\d]','',number)
|
number=re.sub('[^\d]','',number)
|
||||||
return number+SMSCODES[provider]
|
return number+SMSCODES[provider]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -877,7 +877,3 @@ if __name__ == '__main__':
|
|||||||
s.cell('b', value="=sin(a)")
|
s.cell('b', value="=sin(a)")
|
||||||
s.cell('c', value="=cos(a)**2+b*b")
|
s.cell('c', value="=cos(a)**2+b*b")
|
||||||
print s['c'].computed_value
|
print s['c'].computed_value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,3 @@ if __name__=='__main__':
|
|||||||
print 'paid',s['paid'],s['amount'] ,s['currency']
|
print 'paid',s['paid'],s['amount'] ,s['currency']
|
||||||
s = Stripe(key).refund(d[u'id'])
|
s = Stripe(key).refund(d[u'id'])
|
||||||
print 'refunded',s['refunded']
|
print 'refunded',s['refunded']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -241,11 +241,3 @@ class TaskBarIcon:
|
|||||||
|
|
||||||
RUNNING = 0
|
RUNNING = 0
|
||||||
STOPPED = 1
|
STOPPED = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,3 @@ if __name__=='__main__':
|
|||||||
print('')
|
print('')
|
||||||
# You can turn off ordering of results
|
# You can turn off ordering of results
|
||||||
print(t.getReportText(orderByCost=False))
|
print(t.getReportText(orderByCost=False))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -516,9 +516,3 @@ class mobilize(object):
|
|||||||
items.insert(-1,'mobile')
|
items.insert(-1,'mobile')
|
||||||
current.response.view = '.'.join(items)
|
current.response.view = '.'.join(items)
|
||||||
return self.func()
|
return self.func()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -200,6 +200,3 @@ def test_web2py_registration_and_login():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test_web2py_registration_and_login()
|
test_web2py_registration_and_login()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -188,11 +188,3 @@ if __name__ == "__main__":
|
|||||||
http_server = tornado.httpserver.HTTPServer(application)
|
http_server = tornado.httpserver.HTTPServer(application)
|
||||||
http_server.listen(int(options.port), address=options.address)
|
http_server.listen(int(options.port), address=options.address)
|
||||||
tornado.ioloop.IOLoop.instance().start()
|
tornado.ioloop.IOLoop.instance().start()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -188,4 +188,3 @@ class TrackImporter(object):
|
|||||||
return file
|
return file
|
||||||
|
|
||||||
TRACK_IMPORTER = TrackImporter()
|
TRACK_IMPORTER = TrackImporter()
|
||||||
|
|
||||||
|
|||||||
@@ -9548,4 +9548,3 @@ DAL.Table = Table # was necessary in gluon/globals.py session.connect
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|
||||||
|
|||||||
@@ -189,8 +189,3 @@ qdb_debugger.set_params(dict(call_stack=True, environment=True))
|
|||||||
|
|
||||||
import gluon.main
|
import gluon.main
|
||||||
gluon.main.global_settings.debugging = True
|
gluon.main.global_settings.debugging = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,11 +72,3 @@ def autoDetectXMLEncoding(buffer):
|
|||||||
def decoder(buffer):
|
def decoder(buffer):
|
||||||
encoding = autoDetectXMLEncoding(buffer)
|
encoding = autoDetectXMLEncoding(buffer)
|
||||||
return buffer.decode(encoding).encode('utf8')
|
return buffer.decode(encoding).encode('utf8')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,3 @@ def abspath(*relpath, **base):
|
|||||||
if gluon:
|
if gluon:
|
||||||
return os.path.join(global_settings.gluon_parent, path)
|
return os.path.join(global_settings.gluon_parent, path)
|
||||||
return os.path.join(global_settings.applications_parent, path)
|
return os.path.join(global_settings.applications_parent, path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -751,4 +751,3 @@ class Session(Storage):
|
|||||||
del response.session_file
|
del response.session_file
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -342,11 +342,3 @@ if __name__ == '__main__':
|
|||||||
argfp.close()
|
argfp.close()
|
||||||
print '<html><body>' + highlight(data, sys.argv[2])\
|
print '<html><body>' + highlight(data, sys.argv[2])\
|
||||||
+ '</body></html>'
|
+ '</body></html>'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2535,4 +2535,3 @@ class MARKMIN(XmlComponent):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|
||||||
|
|||||||
@@ -149,11 +149,3 @@ def redirect(location, how=303, client_side=False):
|
|||||||
raise HTTP(how,
|
raise HTTP(how,
|
||||||
'You are being redirected <a href="%s">here</a>' % loc,
|
'You are being redirected <a href="%s">here</a>' % loc,
|
||||||
Location=loc)
|
Location=loc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -107,11 +107,3 @@ for module in base_modules + contributed_modules:
|
|||||||
msg += "Try the following command: "
|
msg += "Try the following command: "
|
||||||
msg += "easy_install-%(python_version)s -U %(module)s" % locals()
|
msg += "easy_install-%(python_version)s -U %(module)s" % locals()
|
||||||
raise ImportError, msg
|
raise ImportError, msg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -905,4 +905,3 @@ def update_all_languages(application_path):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
|
||||||
|
|||||||
@@ -857,5 +857,3 @@ class HttpServer(object):
|
|||||||
os.unlink(self.pid_filename)
|
os.unlink(self.pid_filename)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,3 @@ class MessageBoxHandler(logging.Handler):
|
|||||||
if tkMessageBox:
|
if tkMessageBox:
|
||||||
msg = self.format(record)
|
msg = self.format(record)
|
||||||
tkMessageBox.showinfo('info1', msg)
|
tkMessageBox.showinfo('info1', msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user