Skip to content

Instantly share code, notes, and snippets.

View alecthomas's full-sized avatar
😀

Alec Thomas alecthomas

😀
View GitHub Profile
# -*- coding: utf-8 -*-
# golang.py - sublimelint package for checking golang files
import glob
import os
import re
import subprocess
from base_linter import BaseLinter, INPUT_METHOD_FILE
type TaskNode struct {
children []*Node
}
func (self *Task) AddChild(node *TaskNode) {
self.children = append(self.children, node)
}
func (self *Task) ChildAt(index int) *TaskNode {
return self.children[index]
$ curl -d 'hello world' http://pushyrobot.appspot.com/push/swapoff.org/m6I02zmlA
<pre>Traceback (most recent call last):
File &quot;/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py&quot;, line 512, in __call__
handler.post(*groups)
File &quot;/base/data/home/apps/pushyrobot/1.340741887312755514/pushy/receive.py&quot;, line 19, in post
if self._pushy.handle_push(self.request.path, self.request.body):
File &quot;/base/data/home/apps/pushyrobot/1.340741887312755514/pushy/pushy.py&quot;, line 23, in handle_push
self._reply_to_wave(wave_id, wavelet_id, message)
File &quot;/base/data/home/apps/pushyrobot/1.340741887312755514/pushy/pushy.py&quot;, line 27, in _reply_to_wave
import logging
import gevent
from thrift.server.TServer import TServer
# XXX Hackish, but should be safe: monkey patch gevent socket support into
# Thrift. Overall I think this is cleaner than reimplementing all of TSocket.
from thrift.transport import TSocket; TSocket.socket = gevent.socket
from thrift.transport.TTransport import TTransportException