diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/part-handler.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/examples/part-handler.txt b/doc/examples/part-handler.txt new file mode 100644 index 00000000..1fe37f3a --- /dev/null +++ b/doc/examples/part-handler.txt @@ -0,0 +1,12 @@ +#part-handler +# vi: syntax=python ts=4 + +def list_types(): + return(["text/plain", "text/go-cubs-go"]) + +def handle_part(data,ctype,filename,payload): + if ctype == "__end__" or ctype == "__begin__": return + + print "==== received ctype=%s filename=%s ====" % (ctype,filename) + print payload + print "==== end ctype=%s filename=%s" % (ctype, filename) |