Skip to content

Instantly share code, notes, and snippets.

@rtyler
Created April 16, 2009 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtyler/96651 to your computer and use it in GitHub Desktop.
Save rtyler/96651 to your computer and use it in GitHub Desktop.
Cheetah markup like this:
#try
#import cjson
#except ImportError
#import simplejson
#end try
Will now appropriately generate this code:
try:
import cjson
except ImportError:
import simplejson
Instead of what it previously generated:
import cjson
import simplejson
try:
except ImportError
#def foo()
## Import mymodule local to my function
#import mymodule
#end def
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment