# Path: nudge/json.py
# def json_decode(o):
#     # remove tabs if they exists
#     o = o.replace('\t','')
#     data = _decoder.decode(o)
#     return data


from optparse import OptionParser
from nudge.json import json_decode
import tornado.httpserver
import tornado.ioloop
import tornado.web

                <form action="/hello" method="get">
                <input type="text" name="name" value="Joe"/>
                <input type="submit" value="get"/>
                </form>
                </html>
                """

    def post_hello(self, name):
        return "Hello %s" % name

    def put_hello(self, name):
        return "Hello %s" % name

    def get_hello(sef, name, number=0):
        if number:
            name = '%s %i' % (name, number)
        return "Hello %s" % name


hws = HelloWorldService()

class MainHandler(tornado.web.RequestHandler):

    def get(self):
        self.write(hws.index())

class HelloHandler(tornado.web.RequestHandler):

    def post(self, name=None):

# Path: nudge/json.py
# def json_decode(o):
#     # remove tabs if they exists
#     o = o.replace('\t','')
#     data = _decoder.decode(o)
#     return data


# Path: examples/oldstylehelloworld.py
from optparse import OptionParser
from nudge.json import json_decode
import tornado.httpserver
import tornado.ioloop
import tornado.web


                <form action="/hello" method="get">
                <input type="text" name="name" value="Joe"/>
                <input type="submit" value="get"/>
                </form>
                </html>
                """

    def post_hello(self, name):
        return "Hello %s" % name

    def put_hello(self, name):
        return "Hello %s" % name

    def get_hello(sef, name, number=0):
        if number:
            name = '%s %i' % (name, number)
        return "Hello %s" % name


hws = HelloWorldService()

class MainHandler(tornado.web.RequestHandler):

    def get(self):
        self.write(hws.index())

class HelloHandler(tornado.web.RequestHandler):

    def post(self, name=None):

        body = json_decode(self.request.body)