cerr writes:
> Hi,
>
> I have a Python script that is executing an http POST to transfer a file from
> the client to the server. I have achieved this with below code:
> but my problem is, the data gets posted to the sever but arrives in
> the `$_REQUEST` array and I'm
Hi,
I have a Python script that is executing an http POST to transfer a file from
the client to the server. I have achieved this with below code:
from binascii import hexlify, unhexlify
from httplib import HTTPConnection, HTTPException
import os
import hashlib
import socket
import urllib2
On Tuesday, August 6, 2013 5:14:48 PM UTC-7, MRAB wrote:
> On 06/08/2013 23:52, cerr wrote:
>
> > Hi,
>
> >
>
> > Why does this code:
>
> >
>
> > #!/usr/bin/python
>
> >
>
> >
>
> > import urllib2
>
> > from binascii import hexlify, unhexlify
>
> >
>
> > host = "localhost"
>
> > uri="/t
On Tue, Aug 6, 2013 at 11:52 PM, cerr wrote:
> ./post.py
> Traceback (most recent call last):
> File "./post.py", line 13, in
> response = urllib2.urlopen(req, 120)
> File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
> return _opener.open(url, data, timeout)
> File "/usr/li
On 06/08/2013 23:52, cerr wrote:
Hi,
Why does this code:
#!/usr/bin/python
import urllib2
from binascii import hexlify, unhexlify
host = "localhost"
uri="/test.php"
data ="\x48\x65\x6C\x6C\x6F\x57\x6F\x72\x6C\x64" #Hello World
url="http://{0}{1}?f=test".format(host, uri)
req = urllib2.Reques
On Tue, Aug 6, 2013 at 7:35 PM, cerr wrote:
> On Tuesday, August 6, 2013 4:08:34 PM UTC-7, Joel Goldstick wrote:
>> On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
>>
>> > Hi,
>>
>> >
>>
>> > Why does this code:
>>
>> >
>>
>> > #!/usr/bin/python
>>
>> >
>>
>> >
>>
>> > import urllib2
>>
>> > from bin
On Tuesday, August 6, 2013 4:08:34 PM UTC-7, Joel Goldstick wrote:
> On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
>
> > Hi,
>
> >
>
> > Why does this code:
>
> >
>
> > #!/usr/bin/python
>
> >
>
> >
>
> > import urllib2
>
> > from binascii import hexlify, unhexlify
>
> >
>
> > host = "loc
On Tue, Aug 6, 2013 at 6:52 PM, cerr wrote:
> Hi,
>
> Why does this code:
>
> #!/usr/bin/python
>
>
> import urllib2
> from binascii import hexlify, unhexlify
>
> host = "localhost"
> uri="/test.php"
> data ="\x48\x65\x6C\x6C\x6F\x57\x6F\x72\x6C\x64" #Hello World
> url="http://{0}{1}?f=test".forma
Hi,
Why does this code:
#!/usr/bin/python
import urllib2
from binascii import hexlify, unhexlify
host = "localhost"
uri="/test.php"
data ="\x48\x65\x6C\x6C\x6F\x57\x6F\x72\x6C\x64" #Hello World
url="http://{0}{1}?f=test".format(host, uri)
req = urllib2.Request(url, data,{'Content-Type': 'appli
On Thu, Jul 18 2013,Joel Goldstick wrote:
[snipped 28 lines]
>
> Many people find urllib and urllib2 to be confusing. There is a module
> called requests which makes this stuff a lot easier. ymmv
>
> http://docs.python-requests.org/en/latest/
Yes, please use this instead of the url* ones, eas
On 18/07/2013 4:49 AM, Matt Graves wrote:
How would I submit a python HTTP POST request to... for example, go to google.com, enter
"Pie" into the search box and submit (Search)
Other replies have suggested how you could do it by building the request
yourself. Another approach is t
On Wed, Jul 17, 2013 at 4:15 PM, John Gordon wrote:
> In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves <
> tunacu...@gmail.com> writes:
>
> > How would I submit a python HTTP POST request to... for example, go to
> > google.com, enter &qu
In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves
writes:
> How would I submit a python HTTP POST request to... for example, go to
> google.com, enter "Pie" into the search box and submit (Search)
Something like this:
import urllib
import urllib2
#
I am going to be creating a python script that will make filling in information
at my job easier.
I have all of the information I need... I guess I just need to see it in
practice to fully grasp it.
How would I submit a python HTTP POST request to... for example, go to
google.com, enter &quo
Cookies work because I am able to login on website and GET other pages.
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-01-06, Chris Rebert wrote:
> On Wed, Jan 5, 2011 at 11:21 PM, Garland Fulton wrote:
>> On Wed, Jan 5, 2011 at 7:26 PM, Tim Harig wrote:
>>> Python 3.1.2 (r312:79147, Oct 9 2010, 00:16:06)
>>> [GCC 4.4.4] on linux2
>>> Type "help", "copyright", "credits" or "license" for more in
On Wed, Jan 5, 2011 at 11:21 PM, Garland Fulton wrote:
> On Wed, Jan 5, 2011 at 7:26 PM, Tim Harig wrote:
>>
>> On 2011-01-06, Slie wrote:
>> [reformated to <80 columns per RFC 1855 guidelines]
>> > I have read several examples on python post requests but I'm not sure
>> > mine needs to be that
On Wed, Jan 5, 2011 at 7:26 PM, Tim Harig wrote:
> On 2011-01-06, Slie wrote:
> [reformated to <80 columns per RFC 1855 guidelines]
> > I have read several examples on python post requests but I'm not sure
> > mine needs to be that complicated.
>
> >From the HTML example on the page you posted:
On Wed, Jan 5, 2011 at 7:52 PM, Chris Rebert wrote:
> On Wed, Jan 5, 2011 at 7:36 PM, Slie wrote:
> >
> > http://code.google.com/apis/chart/docs/post_requests.html
> >
> > Google will return a chart in your browser from a URL that you have
> built. If your URL is bigger then 2K characters it wil
> On Wed, Jan 5, 2011 at 7:52 PM, Chris Rebert wrote:
>> On Wed, Jan 5, 2011 at 7:36 PM, Slie wrote:
>> >
>> > http://code.google.com/apis/chart/docs/post_requests.html
>> >
>> > Google will return a chart in your browser from a URL that you have
>> > built. If your URL is bigger then 2K characte
On 01/06/2011 12:16 AM, Garland Fulton wrote:
> I tried to use "pygooglechart.py" and I have been trying to get it set
> up all day actually along with several other graphing API's.
>
> I just found out that there is a problem with numpy and python 3.1 that
> is why I moved from the API's. Should
Thank you for showing me the POST request, I will defiantly learn a lot from
that.
On Wed, Jan 5, 2011 at 7:26 PM, Tim Harig wrote:
> On 2011-01-06, Slie wrote:
> [reformated to <80 columns per RFC 1855 guidelines]
> > I have read several examples on python post requests but I'm not sure
> > mi
I tried to use "pygooglechart.py" and I have been trying to get it set up
all day actually along with several other graphing API's.
I just found out that there is a problem with numpy and python 3.1 that is
why I moved from the API's. Should I change version just for
these library's?
Should I be
On Wed, Jan 5, 2011 at 7:36 PM, Slie wrote:
>
> http://code.google.com/apis/chart/docs/post_requests.html
>
> Google will return a chart in your browser from a URL that you have built. If
> your URL is bigger then 2K characters it will allow you to submit POST
> requests.
>
> They gives examples
On 2011-01-06, Slie wrote:
[reformated to <80 columns per RFC 1855 guidelines]
> I have read several examples on python post requests but I'm not sure
> mine needs to be that complicated.
>From the HTML example on the page you posted:
http://code.google.com/apis/chart/docs/post_requests.html
Google will return a chart in your browser from a URL that you have built. If
your URL is bigger then 2K characters it will allow you to submit POST requests.
They gives examples of HTML, JavaScript, and PHP POST requests. Is there a way
On May 28, 5:24 pm, christian schulze wrote:
> On 28 Mai, 17:20, yqyq22 wrote:
>
>
>
>
>
> > On May 28, 5:17 pm, christian schulze wrote:
>
> > > On 28 Mai, 16:47, yqyq22 wrote:
>
> > > > Hy, i would like to create a little script to reproduce this one
> > > > below:
> > > > Do you have suggest
On 28 Mai, 17:20, yqyq22 wrote:
> On May 28, 5:17 pm, christian schulze wrote:
>
>
>
> > On 28 Mai, 16:47, yqyq22 wrote:
>
> > > Hy, i would like to create a little script to reproduce this one
> > > below:
> > > Do you have suggestion?
>
> > > POST /folder/path/upload.exe?/dir HTTP/1.1
> > > Ho
On May 28, 5:17 pm, christian schulze wrote:
> On 28 Mai, 16:47, yqyq22 wrote:
>
>
>
>
>
> > Hy, i would like to create a little script to reproduce this one
> > below:
> > Do you have suggestion?
>
> > POST /folder/path/upload.exe?/dir HTTP/1.1
> > Host: 192.168.100.1:8080
> > User-Agent: Mozill
On 28 Mai, 16:47, yqyq22 wrote:
> Hy, i would like to create a little script to reproduce this one
> below:
> Do you have suggestion?
>
> POST /folder/path/upload.exe?/dir HTTP/1.1
> Host: 192.168.100.1:8080
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.9.2.3) Gecko/2010040
On May 12, 6:13 am, Kushal Kumaran
wrote:
> On Tue, May 11, 2010 at 3:59 PM, kak...@gmail.com wrote:
> > On May 11, 10:56 am, "kak...@gmail.com" wrote:
> >> On May 11, 5:06 am, Kushal Kumaran
> >> wrote:
>
> >> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com
> >> > wrote:
> >> > > On May
On Tue, May 11, 2010 at 3:59 PM, kak...@gmail.com wrote:
> On May 11, 10:56 am, "kak...@gmail.com" wrote:
>> On May 11, 5:06 am, Kushal Kumaran
>> wrote:
>>
>>
>>
>> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
>> > > On May 10, 10:22 am, Kushal Kumaran
>> > > wrote:
>> > >> On M
On May 11, 10:56 am, "kak...@gmail.com" wrote:
> On May 11, 5:06 am, Kushal Kumaran
> wrote:
>
>
>
> > On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> > > On May 10, 10:22 am, Kushal Kumaran
> > > wrote:
> > >> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com
> > >> wrote:
> > >>
On May 11, 5:06 am, Kushal Kumaran
wrote:
> On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> > On May 10, 10:22 am, Kushal Kumaran
> > wrote:
> >> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> >> > Hi to all, i want to ask you a question, concerning the best way to do
> >
On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com wrote:
> On May 10, 10:22 am, Kushal Kumaran
> wrote:
>> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
>> > Hi to all, i want to ask you a question, concerning the best way to do
>> > the following as a POST request:
>> > There is serv
On May 10, 10:22 am, Kushal Kumaran
wrote:
> On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> > Hi to all, i want to ask you a question, concerning the best way to do
> > the following as a POST request:
> > There is server-servlet that accepts xml commands
> > It had the following HTTP
On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com wrote:
> Hi to all, i want to ask you a question, concerning the best way to do
> the following as a POST request:
> There is server-servlet that accepts xml commands
> It had the following HTTP request headers:
>
> Host: somehost.com
>
Hi to all, i want to ask you a question, concerning the best way to do
the following as a POST request:
There is server-servlet that accepts xml commands
It had the following HTTP request headers:
Host: somehost.com
User-Agent: Jakarta Commons-HttpClient
Content
Thank you all for your responses, and Javier thank you for your longer
response. I've just downloaded mechanize and beautifulsoup and will
start to play around.
>From a pure learning standpoint, however, I'd really like to learn how
to use the python post method (without mechanize) to go to a webp
Thank you all for your responses, and Javier thank you for your longer
response. I've just downloaded mechanize and beautifulsoup and will
start to play around.
>From a pure learning standpoint, however, I'd really like to learn how
to use the python post method (without mechanize) to go to a webp
Thank you all for your responses, and Javier thank you for your longer
response. I've just downloaded mechanize and beautifulsoup and will
start to play around.
>From a pure learning standpoint, however, I'd really like to learn how
to use the python post method (without mechanize) to go to a webp
Hello,
I haven't used httplib2, but you can certainly use any other
alternative to send HTTP requests:
- urllib/urllib2
- mechanize
With regard to how do you find the form you're looking for, you may:
- create the HTTP request on your own with urllib2. To find out what
variables do you need to po
On 2/11/2010 2:11 PM, galileo228 wrote:
Hey All,
Been teaching myself Python for a few weeks, and am trying to write a
program that will go to a url, enter a string in one of the search
fields, submit the search, and return the contents of the search
result.
I'm using httplib2.
My two particul
"Use tamperdata to view and modify HTTP/HTTPS headers and post
parameters... "
https://addons.mozilla.org/en-US/firefox/addon/966
Enjoy,
Ken
galileo228 wrote:
Hey All,
Been teaching myself Python for a few weeks, and am trying to write a
program that will go to a url, enter a string in one o
Hey All,
Been teaching myself Python for a few weeks, and am trying to write a
program that will go to a url, enter a string in one of the search
fields, submit the search, and return the contents of the search
result.
I'm using httplib2.
My two particular questions:
1) When I set my 'body' var
Thanks for your response.
> How did you post the data? If you post binary data you should indicate
> this with a proper mime type, like application/octet-stream. Otherwise
> it might be interpreted as text which it isn't.
> --
I am trying to send the data using following code:
...
opener = urll
> subeen (s) wrote:
>s> Hi,
>s> I am trying to send compressed data to a server written in django. But
>s> it shows error while decompressing the data in the server. After some
>s> experiment I found that the server is not receiving the exact data I
>s> am sending.
>s> data = 'hello, this is
Hi,
I am trying to send compressed data to a server written in django. But
it shows error while decompressing the data in the server. After some
experiment I found that the server is not receiving the exact data I
am sending.
data = 'hello, this is a test message this is another message'
data = z
John Giotta wrote:
>
>Is there a verbose feature for urllib2.urlopen?
You have the full source code for the module right in front of you.
Bringing up urllib2.py in an editor is quicker than waiting for a newsgroup
reply.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
--
http://ma
Is there a verbose feature for urllib2.urlopen?
Here is my python snippet for posted the file:
req = urllib2.Request(url='https://%s%s' % (host, selector),
data=open('test.zip', 'rb').read())
req.add_header('content-type', 'application/zip')
req.add_header('Authorization', 'Basic %s' % self.auth)
On 2009-09-09, John D Giotta wrote:
> I'm working with an API that allows me to POST a zip file via HTTP and
> the documentation uses a cURL example. cURL works, but when I try to
> POST the file via python it fails.
> I don't want to use cURL (since I'm trying to be transparent and
> dependency-l
On Wed, Sep 9, 2009 at 1:57 PM, John D Giotta wrote:
> I'm working with an API that allows me to POST a zip file via HTTP and
> the documentation uses a cURL example. cURL works, but when I try to
> POST the file via python it fails.
> I don't want to use cURL (since I'm trying to be transparent an
I'm working with an API that allows me to POST a zip file via HTTP and
the documentation uses a cURL example. cURL works, but when I try to
POST the file via python it fails.
I don't want to use cURL (since I'm trying to be transparent and
dependency-less), but I can't find anything online that wor
En Wed, 22 Jul 2009 18:18:37 -0300, scriptlear...@gmail.com
escribió:
On Jul 22, 1:54 pm, "Diez B. Roggisch" wrote:
You can use proxy-tools such as tcpmon or sniff traffic using wireshark.
Thanks,
but I am trying to enable some debug mode to log all outgoing and
incoming messages for certain
On Jul 22, 1:54 pm, "Diez B. Roggisch" wrote:
> You can use proxy-tools such as tcpmon or sniff traffic using wireshark.
>
> Diez
Thanks,
but I am trying to enable some debug mode to log all outgoing and
incoming messages for certain period of time, and running another
proxy-tool is not very idea
scriptlear...@gmail.com schrieb:
I am sending a HTTP POST by using the following codes:
opener = urllib2.build_opener(proxyHandler, MultipartPostHandler)
params = { "audio" : "http://sample.com/my.wav";,
"data" : open(file, "rb") }
print opener.open(myUR
I am sending a HTTP POST by using the following codes:
opener = urllib2.build_opener(proxyHandler, MultipartPostHandler)
params = { "audio" : "http://sample.com/my.wav";,
"data" : open(file, "rb") }
print opener.open(myURL, params).read()
How do I
PM
To: python-list@python.org
Subject: Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED
Whatever scumbag would rate a new python's users with one start for
asking us for help is a complete low-life. Keep acting like that and
Python will fade away into the darkness forever.
dhaval,
Don't let
On Fri, Jan 23, 2009 at 8:02 PM, r wrote:
> Whatever scumbag would rate a new python's users with one start for
> asking us for help is a complete low-life. Keep acting like that and
> Python will fade away into the darkness forever.
Could you please explain where these stars you keep talking
dhaval wrote:
> On Jan 14, 4:11 pm, dhaval wrote:
>> Hi,
>>
>> Can someone please give me an example of a working python post?
>> for example using the sitehttp://www.cookiemag.com/
>>
>> Thanks in advance,
>> Dhaval
>
> I have tried to look at the code at
> http://code.activestate.com/recipes/1
On Jan 14, 4:11 pm, dhaval wrote:
> Hi,
>
> Can someone please give me an example of a working python post?
> for example using the sitehttp://www.cookiemag.com/
>
> Thanks in advance,
> Dhaval
I have tried to look at the code at
http://code.activestate.com/recipes/146306/
I can't make any sense
Hi,
Can someone please give me an example of a working python post?
for example using the site http://www.cookiemag.com/
Thanks in advance,
Dhaval
--
http://mail.python.org/mailman/listinfo/python-list
f Mozilla
> headers = {
> 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
> rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4',
> 'Content-Type': content_type
> }
> h.request('POST', selector, body, headers
5.1; en-US;
> rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4',
> 'Content-Type': content_type
> }
> h.request('POST', selector, body, headers)
> res = h.getresponse()
> return res.status, res.reason, res.read()
>
> Please note th
0.4) Gecko/2008102920 Firefox/3.0.4',
'Content-Type': content_type
}
h.request('POST', selector, body, headers)
res = h.getresponse()
return res.status, res.reason, res.read()
Please note that you can use multipart whether or not files are there
Hi,
I need one complete example of how to do a http post to any site.
I have tried making a POST to google but all I am returned with is a
405 error.
I don't want to use Pygoogle as I want to try and do this with other
sites.
I am also having problems inputing with the param
I have
ilename="newurl-ideas.txt",name="uploadedfile")
>
On Tue, Dec 2, 2008 at 1:33 PM, S.Selvam Siva <[EMAIL PROTECTED]>wrote:
> I am trying to post file from python to php using HTTP POST method. I tried
> mechanize but not able to pass the file object.
>
I am trying to post file from python to php using HTTP POST method. I tried
mechanize but not able to pass the file object.
from mechanize import Browser
br=Browser()
response=br.open("http://localhost/test.php";)
br.select_form('form1')
br['uploadedfile']=open(&
have you tried using the
def request(self, method, url, body=None, headers={})
method instead of putrequest, endheaders, send methods?
where body is
--===1845688244==
Content-Type: application/vnd.cip4-jmf+xml
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-ID: beginning
Sadly, there is no way to increase the log verbosity.
On Oct 17, 2:42 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message
> <[EMAIL PROTECTED]>,
>
>
>
> [EMAIL PROTECTED] wrote:
> > On Oct 15, 2:42 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
> > central.gen.new_z
In message
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> On Oct 15, 2:42 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
> central.gen.new_zealand> wrote:
>
>> In message
>> <[EMAIL PROTECTED]>,
>>
>> [EMAIL PROTECTED] wrote:
>> > ... but I'm getting a very vague server error message ...
>>
>> Which
On Oct 15, 2:42 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message
> <[EMAIL PROTECTED]>,
>
> [EMAIL PROTECTED] wrote:
> > ... but I'm getting a very vague server error message ...
>
> Which is?
In this case it's not really something that will be readily recogn
Lawrence D'Oliveiro wrote:
> In message
> <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
>> ... but I'm getting a very vague server error message ...
>
> Which is?
>
very vague ...
--
Steve Holden+1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
In message
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> ... but I'm getting a very vague server error message ...
Which is?
--
http://mail.python.org/mailman/listinfo/python-list
This has got me somewhat stumped, so I'll throw it up here in hopes
that someone has ran into this before. I'm trying to send a MIME
package to Esko Backstage. I'm a bit confused as to how to send this
to the server in a manner that it'll be able to get and de-code the
MIME package in a valid way.
Paul Rubin wrote:
> Wolfgang Draxinger <[EMAIL PROTECTED]> writes:
>> Am I just blind for some urllib2/httplib feature, or some
>> other library? Or do I really have to fiddle around with
>> sockets myself (I hope not...).
>
> I did something like that by just opening a socket and writing
> the
>
Wolfgang Draxinger <[EMAIL PROTECTED]> writes:
> Am I just blind for some urllib2/httplib feature, or some other
> library? Or do I really have to fiddle around with sockets
> myself (I hope not...).
I did something like that by just opening a socket and writing the
stuff with socket.sendall. It'
Wolfgang Draxinger wrote:
> The problem is, that videos, by nature are rather big files,
> however urllib2 wants it's Request objects being prepared
> beforehand, which would mean to first load the whole file to memory.
Try using mmap. Here is some untested code:
map = mmap(file.fileno(
En Sat, 19 Jan 2008 21:19:24 -0200, Wolfgang Draxinger
<[EMAIL PROTECTED]> escribi�:
> I'm thinking about writing a script to upload videos to sites
> like YouTube or Google Video, which is usually done by a HTTP
> POST.
>
> The problem is, that videos, by nature are r
I'm thinking about writing a script to upload videos to sites
like YouTube or Google Video, which is usually done by a HTTP
POST.
The problem is, that videos, by nature are rather big files,
however urllib2 wants it's Request objects being prepared
beforehand, which would mean to firs
[EMAIL PROTECTED] wrote:
> Hmm, I guess I meant something different by using "body"- I meant
> request data part and not the thing sent in ulr string.
You should specify better what you need yes.
See, to send POST information in an http request, you can do the
following...
>>> urllib2.urlopen(m
On May 18, 4:57 pm, "Dave Borne" <[EMAIL PROTECTED]> wrote:
> > I need to build a special http post body that consists of :
> > name=value +\r\n strings.
> > Problem is that depending on operations the number of name,value
> > pairs can increase and decrea
Why not use scotch.recorder?
Dave Borne wrote:
I need to build a special http post body that consists of :
name=value +\r\n strings.
Problem is that depending on operations the number of name,value
pairs can increase and decrease.
Values need to be initialized at runtime, so storing premade
> I need to build a special http post body that consists of :
> name=value +\r\n strings.
> Problem is that depending on operations the number of name,value
> pairs can increase and decrease.
> Values need to be initialized at runtime, so storing premade text
> files is not
Hi all, I'm rather new to python but not exaclty without programming
experience and not quite get best pyhton practices.
I have a following problem that it seems I cannot find a way to solve
correctly.
I need to build a special http post body that consists of :
name=value +\r\n strings.
Pr
[EMAIL PROTECTED] (John J. Lee) writes:
[...]
> #---
> import mechanize
>
> SHOW_COOKIES = True
>
> br = mechanize.Browser()
> if SHOW_COOKIES:
> cj = mechanize.CookieJar()
> br.set_cookiejar(cj)
> br.open("http://www.magnetshare.com/main.php";)
> br.select_for
On Sat, 24 Jun 2006 01:28:29 GMT, [EMAIL PROTECTED] (John J. Lee)
wrote:
>[EMAIL PROTECTED] writes:
>
>> On 22 Jun 2006 16:19:50 -0700, "Justin Azoff"
>> <[EMAIL PROTECTED]> wrote:
>>
>> >Jeethu Rao wrote:
>> >> You need to use httplib.
>> >> http://docs.python.org/lib/httplib-examples.html
>> >
[EMAIL PROTECTED] writes:
> On 22 Jun 2006 16:19:50 -0700, "Justin Azoff"
> <[EMAIL PROTECTED]> wrote:
>
> >Jeethu Rao wrote:
> >> You need to use httplib.
> >> http://docs.python.org/lib/httplib-examples.html
> >>
> >> Jeethu Rao
> >
> >Not at all. They need to read the documentation for urrli
On 22 Jun 2006 16:19:50 -0700, "Justin Azoff"
<[EMAIL PROTECTED]> wrote:
>Jeethu Rao wrote:
>> You need to use httplib.
>> http://docs.python.org/lib/httplib-examples.html
>>
>> Jeethu Rao
>
>Not at all. They need to read the documentation for urrlib:
>
>http://docs.python.org/lib/module-urllib.
Jeethu Rao wrote:
> You need to use httplib.
> http://docs.python.org/lib/httplib-examples.html
>
> Jeethu Rao
Not at all. They need to read the documentation for urrlib:
http://docs.python.org/lib/module-urllib.html
http://docs.python.org/lib/node483.html
"The following example uses the "POST"
You need to use httplib.
http://docs.python.org/lib/httplib-examples.html
Jeethu Rao
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone,
I'm creating a desktop Python application that requires web-based
authentication for accessing additional application features.
HTTP GET is really simple.
HTTP POST is not (at least for me anyway);)
I have tried a few different sources, but I cannot get HTTP PO
>>The values of some inputs are encoded using html entities.
>>How can I decode a string like "Bessy's cat" in "Bessy's cat"?
>>
>>
>
>this snippet might help:
>
>http://effbot.org/zone/re-sub.htm#strip-html
>
>
Thank you, worked like a charm. :-)
Laszlo
--
http://mail.python.org/m
Laszlo Zsolt Nagy wrote:
> The values of some inputs are encoded using html entities.
> How can I decode a string like "Bessy's cat" in "Bessy's cat"?
this snippet might help:
http://effbot.org/zone/re-sub.htm#strip-html
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Zsolt Nagy wrote:
> The values of some inputs are encoded using html entities.
> How can I decode a string like "Bessy's cat" in "Bessy's cat"?
http://groups.google.com/group/comp.lang.python/browse_frm/thread/819731a536a4c1a2/fce6c2f6c3d46e9c?q=htmlentitydefs&rnum=2#fce6c2f6c3d46e9c
Kent
> Well I don't understand what's encoding the apostrophe as an encoded
> entity anyway. That's only supposed to be done for HTML content, not
> form content.
You are right. I was wrong. The problem was not with quote. It was
reading out the VALUE of an INPUT from HTML source.
> How about an
Laszlo Zsolt Nagy enlightened us with:
> The values of some inputs are encoded using html entities. How can
> I decode a string like "Bessy's cat" in "Bessy's cat"?
This should help:
http://docs.python.org/lib/module-htmlentitydefs.html
Sybren
--
The problem with the world is stupidity. Not sa
[copied to list]
Laszlo Zsolt Nagy wrote:
>>
>>
>> See urllib.urlencode(). No idea why they don't include it in urllib2
>> as well, but there you go.
>>
>> >>> from urllib import urlencode
>> >>> urlencode({'a':'& "Simple string"', 'b': '<>[EMAIL PROTECTED]&*()_+='})
>> 'a=%26+%22Simple+string%22
>
>
>See urllib.urlencode(). No idea why they don't include it in urllib2 as
>well, but there you go.
>
> >>> from urllib import urlencode
> >>> urlencode({'a':'& "Simple string"', 'b': '<>[EMAIL PROTECTED]&*()_+='})
>'a=%26+%22Simple+string%22&b=%3C%3E%21%40%23%24%25%5E%26%2A%28%29_%2B%3D'
> >>>
Laszlo Zsolt Nagy wrote:
> Hello,
>
> How can I convert a dictionary into a HTTP POST string?
> I have an example below, but this is not working correctly for special
> characters. (" ' and others). In other words, if I use "Bessy's cat"
> instead
1 - 100 of 105 matches
Mail list logo