Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100686 > unrolled thread
| Started by | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| First post | 2015-12-21 17:51 +0000 |
| Last post | 2015-12-22 15:14 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
Library function to encode data to multipart/form-data format? Grant Edwards <invalid@invalid.invalid> - 2015-12-21 17:51 +0000
Re: Library function to encode data to multipart/form-data format? Laura Creighton <lac@openend.se> - 2015-12-22 00:43 +0100
Re: Library function to encode data to multipart/form-data format? Grant Edwards <invalid@invalid.invalid> - 2015-12-22 15:14 +0000
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2015-12-21 17:51 +0000 |
| Subject | Library function to encode data to multipart/form-data format? |
| Message-ID | <n59e64$ct4$1@reader1.panix.com> |
Is there a standard library function that can be used to encode data
into multipart/form-data format? IIRC, I looked for this once before
and didn't find anything in the library.
[I don't want to actually send an HTTP POST or an email message, I
just need to generate sets of data for test purposes.]
--
Grant Edwards grant.b.edwards Yow! -- I love KATRINKA
at because she drives a
gmail.com PONTIAC. We're going
away now. I fed the cat.
[toc] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-12-22 00:43 +0100 |
| Message-ID | <mailman.45.1450741438.2237.python-list@python.org> |
| In reply to | #100686 |
In a message of Mon, 21 Dec 2015 17:51:00 +0000, Grant Edwards writes: >Is there a standard library function that can be used to encode data >into multipart/form-data format? IIRC, I looked for this once before >and didn't find anything in the library. > >[I don't want to actually send an HTTP POST or an email message, I >just need to generate sets of data for test purposes.] > >-- >Grant Edwards grant.b.edwards Yow! -- I love KATRINKA > at because she drives a > gmail.com PONTIAC. We're going > away now. I fed the cat. >-- >https://mail.python.org/mailman/listinfo/python-list Cannibalise this: http://code.activestate.com/recipes/146306/ which just uses standard library things. Laura
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2015-12-22 15:14 +0000 |
| Message-ID | <n5bpdf$49g$1@reader1.panix.com> |
| In reply to | #100707 |
On 2015-12-21, Laura Creighton <lac@openend.se> wrote:
> In a message of Mon, 21 Dec 2015 17:51:00 +0000, Grant Edwards writes:
>>Is there a standard library function that can be used to encode data
>>into multipart/form-data format? IIRC, I looked for this once before
>>and didn't find anything in the library.
[...]
> Cannibalise this:
> http://code.activestate.com/recipes/146306/
> which just uses standard library things.
Yep, that's what I ended up doing. I noticed that the code referenced
above doesn't check to make sure the boundary string is not contained
in the data, so I fixed that.
--
Grant Edwards grant.b.edwards Yow! I'm gliding over a
at NUCLEAR WASTE DUMP near
gmail.com ATLANTA, Georgia!!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web