Adding JSONP to turbogears

Date

from tg import json_encode, responsefrom tg.render import _get_tg_varsdef render_jsonp(template_name, template_vars, **kwargs):callback = template_name or kwargs.pop('callback', None) or 'callback'for key in _get_tg_vars():del template_vars[key]response.headers['Content-Type'] = 'text/javascript'return '%s(%s)' % (template_name, json_encode(template_vars))from myapp.config.app_cfg import base_configbase_config.render_functions['jsonp'] = render_jsonpbase_config.mimetype_lookup ...

more ...

Move over bash: Python is my language for setup scripts now.

I know when people discuss using programming languages, there's two main schools of thought:

  • Use the same language for as much of your stack as possible
  • Use the language that's most appropriate for each part of the stack as much of possible.

Clearly, there's very strong advantages ...

more ...



Slimy: another html5 slideshow

image0After seeing a coworker's presentation completely done using html5 and javascript, I really realized how much of a platform that html5 can be. Effectively, it's a ubiquitous platform by which any operating system can run code, with very little prior setup necessary. I really liked the concept of ...

more ...

Passing perforce batch files

Date

My coworker showed this to me today: if you want to use a perforce command from the command line, and pass it a batch of filenames from a command (such as find or grep), simply use:

p4 COMMAND ${ENTER_COMMAND_HERE}

more ...


About Yusuke Tsutsumi
Software Engineer at Zillow. I focus on tools and services for developer productivity, including build and testing.

My other interests include programming language design, game development, and learning languages (the non-programming ones).