Skip to content

Instantly share code, notes, and snippets.

View README
_ __ ___ ___ __ _ | |__ | |__ ___ _ __ _ _ | |_ (_) | | ___
| '_ ` _ \ / __| / _` | | '_ \ | '_ \ / _ \ | '__| _____ | | | | | __| | | | | / __|
| | | | | | | (__ | (_| | | |_) | | |_) | | __/ | | |_____| | |_| | | |_ | | | | \__ \
|_| |_| |_| \___| \__,_| |_.__/ |_.__/ \___| |_| \__,_| \__| |_| |_| |___/
----------------------------------------------------------------------------------------------
mcabbernotify.py
******************
******************
View base.tmpl
####################### base.tmpl #######################
#from Cheetah import Template
#extends Template.Template
#def sidebar()
#end def
#def footer()
#end def
View gist:87553
tyler@pineapple:~/source/rtyler-cheetah-cffd1382674c03199fbbbf661cb7ff00231e72bb/src/Tests> python --version
Python 2.5.1
tyler@pineapple:~/source/rtyler-cheetah-cffd1382674c03199fbbbf661cb7ff00231e72bb/src/Tests> cheetah --version
2.1.0.1
tyler@pineapple:~/source/rtyler-cheetah-cffd1382674c03199fbbbf661cb7ff00231e72bb/src/Tests> python Test.py
....................................................................................................................................................................................................
....................................................................................................................................................................................................
....................................................................................................................................................................................................
......................................................................................
View gist:89568
/usr/local/lib64/python2.6/site-packages/ZSI-2.1_a1-py2.6.egg/ZSI/resolvers.py:7: DeprecationWarning: the multifile module has been deprecated since Python 2.5
/usr/local/lib64/python2.6/site-packages/ZSI-2.1_a1-py2.6.egg/ZSI/wstools/XMLSchema.py:3107: DeprecationWarning: object.__init__() takes no parameters
Traceback (most recent call last):
File "/usr/local/bin/wsdl2py", line 8, in <module>
load_entry_point('ZSI==2.1-a1', 'console_scripts', 'wsdl2py')()
File "build/bdist.linux-x86_64/egg/ZSI/generate/commands.py", line 147, in wsdl2py
File "build/bdist.linux-x86_64/egg/ZSI/generate/commands.py", line 240, in _wsdl2py
File "build/bdist.linux-x86_64/egg/ZSI/generate/wsdl2python.py", line 232, in writeTypes
View gist:89983
/home/tyler/source/github/cheetah/Cheetah/Compiler.py:1531: UserWarning:
You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper.
"\nYou don't have the C version of NameMapper installed! "
...................................................................................................................................................................EE.EEE...EE.EEE...EE.EEE...EE.EEE..........................................................................................................................................................................................................................................................................EEE..EEE..EEE..EEE..........................................................................................................................................................................
View gist:90025
I, [2009-04-03T15:53:18.865498 #6539] INFO -- : saving 1238799198_fail_223
/usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/lib.rb:643:in `command`: git branch -a 2>&1:fatal: Failed to resolve HEAD as a valid ref. (Git::GitExecuteError)
from /usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/lib.rb:615:in `command_lines'
from /usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/lib.rb:209:in `branches_all'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/base.rb:241:in `load_tickets'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/base.rb:72:in `reset_ticgit'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/base.rb:67:in `ticket_new'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/cli.rb:348:in `handle_ticket_new'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/cli.rb:41:in `execute!'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6
View gist:90029
tyler@grapefruit:~/source/github/cheetah> ti new -t "FAIL"
I, [2009-04-03T16:03:46.401574 #6721] INFO -- : saving 1238799826_fail_501
I, [2009-04-03T16:03:46.495587 #6721] INFO -- : creating ticgit repo branch
/usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/lib.rb:643:in `command': git commit -m 'creating the ticgit branch' 2>&1:# On branch ticgit (Git::GitExecuteError)
nothing to commit (working directory clean)
from /usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/lib.rb:386:in `commit'
from /usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/base.rb:264:in `commit'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/base.rb:264:in `init_ticgit_branch'
from /usr/lib64/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit/base.rb:286:in `in_branch'
from /usr/lib64/ruby/gems/1.8/gems/schacon-git-1.0.7/lib/git/base.rb:434:in `with_working'
View gist:96651
Cheetah markup like this:
#try
#import cjson
#except ImportError
#import simplejson
#end try
Will now appropriately generate this code:
try:
import cjson
View gist:96704
javax.servlet.ServletException: DESCRIPTOR
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:448)
at org.kohsuke.stapler.MetaClass.dispatch(MetaClass.java:318)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:436)
at org.kohsuke.stapler.MetaClass.doDispatch(MetaClass.java:186)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:436)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:354)
at org.kohsuke.stapler.Stapler.service(Stapler.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
View gist:96792
tyler@papaya:~> less foo.tmpl
from BaseClass import BaseClass
class $module.module(BaseClass):
pass
tyler@papaya:~> python
Python 2.6 (r26:66714, Dec 3 2008, 10:55:18)
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Cheetah.Template import Template
>>> class FakeModule(object):