This document is obsolete, all the docs for porting are now at https://github.com/mitsuhiko/pocoo-sprint-18052013
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@native_itermethods(['keys', 'values', 'items', 'foo']) | |
class AwsumDict(object): | |
def keys(self): # return iterator | |
def values(self): # return iterator | |
def items(self): # return iterator | |
def foo(self): # return iterator | |
d = AwsumDict() | |
## Python 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mitsuhiko/flask#637 | |
from flask import send_file, Flask, request | |
import datetime | |
app = Flask(__name__) | |
@app.route('/image/<file_id>') | |
def images(file_id): | |
f = open('lel.jpg') # some jpeg file in the same dir |
NewerOlder