Re: Python cgi

2005-10-21 Thread Mitja Trampus
jbrewer wrote:
> I'm currently writing my first CGI script (in Python), and I keep
> getting an error I don't know how to address.  I'm not sure if this is
> a Python or Apache error, but I suspect it's an Apache config thing.

I suspect it's neither :)
Make sure your HTML form looks like

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python cgi script not understood as html

2005-10-24 Thread Mitja Trampus
Philippe C. Martin wrote:
> Hi,
> 
> The following code outputs the actual HTML text to the browser, not the
> interpreted text.
> 
> Any idea ?
> 
> html_ok = """
> Content-Type: text/html\n
 > 
 > ...
 > """

Avoid the starting newline (before content-type).
Add at least TWO newlines after content-type.

Or use a package to handle the HTTP stuff for you.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to find regex for any script in an html source

2005-12-21 Thread Mitja Trampus
28tommy wrote:
> Hi,
> I'm trying to find scripts in html source of a page retrieved from the
> web.
> I'm trying to use the following rule:
> 
> match = re.compile('')
> 
> I'm testing it on a page that includes the following source:
> 
>