thanks for the help, im really not used on doing web stuff, ill try reading the how to.<br><br><div class="gmail_quote">On Wed, Jan 28, 2009 at 9:03 AM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&quot;Tiago Katcipis&quot; &lt;<a href="mailto:katcipis@inf.ufsc.br" target="_blank">katcipis@inf.ufsc.br</a>&gt; wrote<div class="Ih2E3d">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am trying to make a small HTTP server on python just to handle some POST<br>
and GET requests. I never worked with http before and dont know if i am<br>
doing something completely stupid (probably yes).<br>
</blockquote>
<br></div>
Not stupid so much as overly complicated.<br>
<br>
The cgi module will do all the hard work for you including transparently<br>
handling POST and GET requests<br>
<br>
Read the web HOWTO document:<br>
<br>
<a href="http://docs.python.org/howto/webservers.html" target="_blank">http://docs.python.org/howto/webservers.html</a><br>
<br>
Then read the CGI module documentation which includes a very quick<br>
introduction to CGI programming. If you are intending expanding the web<br>
site to anything beyond trivial consider using a Framework such as<br>
Django, Turbo Gears or Pylons.<br>
<br>
Unless you are trying to do something very clever - which given your<br>
level of knowledge I&#39;d guess is not the case - then the standard<br>
cgi module should do all you need!<br>
<br>
HTH,<br>
<br>
<br>
-- <br>
Alan Gauld<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a><br>
<br>
<br>
_______________________________________________<br>
Tutor maillist &nbsp;- &nbsp;<a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>&quot;it might be a profitable thing to learn Java, but it has no intellectual value whatsoever&quot; Alexander Stepanov<br>