473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Looking for cookbook/recipe generating multipart web data

My web server (apache+mod_python) needs to reply on some session with a multipart connection.
My idea is to use the content-type of multipart/mixed; boundary=--myboundary

The data that I would like to send is a continuous stream of data, divided by that boundary.
Well, there are tons of examples on the web how to encode such a stream on the client side, but I can't find an example how to generate this data using mod_python.

So for now in the very simple example, my code looks like:

req.content_type("multipart/mixed; boundary=--myboundary")
while forever:
data = "--myboudary\r\n%s" % getData()
req.write(data)

However, for every req.write, len(data) + lfcr + boundary/data + lfcr is send out and I just want to send boudary/data like I see in existing applications on the web and described in the w3 norms of multipart.

What is the correct way of doing this? Where can I find the proper cookbook?

Thanks,
Vincent

Jul 18 '05 #1
0 1145

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ringwraith | last post by:
Hello! I want to ask You the question about the licence of ASPN online Python Cookbook recipes. Under what licence are those recipes. If I want to use in my application some parts of the code...
4
by: Steven | last post by:
Hello, I'm seeking a read method that will block until new data is available. Is there such a python function that does that? Thanks, Steven Howe
2
by: magoldfish | last post by:
Hi, I've installed Python 2.4 on Windows XP and walked through the Alex Martelli ASPN cookbook example at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66509 This is a recipe for...
2
by: Will McGugan | last post by:
Hi, Is the second edition of the Python Cookbook worth getting if you have the first edition? How much new material is there in the 2nd edition? Thanks, Will McGugan
0
by: TechBookReport | last post by:
TechBookReport (http://www.techbookreport.com) has just published a review of the Python Cookbook. This is an extract from the full review: We're big fans of cookbooks here at TechBookReport,...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
3
by: Steve Howell | last post by:
George Sakkis produced the following cookbook recipe, which addresses a common problem that comes up on this mailing list: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/521877 I...
9
by: Alex Popescu | last post by:
Hi all! I was reading through Python Cookbook the Singleton recipe. At this moment I am a bit puzzled as the example in the book is not working resulting in: TypeError:...
2
by: Nick Craig-Wood | last post by:
Trent Mick <trentm@activestate.comwrote: Looks great and much faster than the old site! Mind telling us how it is implemented? I'm guessing python/django by the url and the fact that you have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.