Re: smart quotes

2008-08-26 Thread Adrian Smith
On Aug 26, 4:13 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Adrian Smith wrote: > > Can anyone tell me how to get rid of smart quotes in html using > > Python? I've tried variations on > > stuff = string.replace(stuff, "\“", "\""), but

smart quotes

2008-08-25 Thread Adrian Smith
Can anyone tell me how to get rid of smart quotes in html using Python? I've tried variations on stuff = string.replace(stuff, "\“", "\""), but to no avail, presumably because they're not standard ASCII. -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML Tables

2008-08-18 Thread Adrian Smith
On Aug 19, 6:49 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Adrian Smith wrote: > >> Just want to know how to create html tables using a for loop. > >> I need to display 34 html tables, so I figured a for loop will do. > >> Please show me an example of how

Re: HTML Tables

2008-08-18 Thread Adrian Smith
On Aug 18, 7:16 pm, Amie <[EMAIL PROTECTED]> wrote: > Afternoon all. > > Just want to know how to create html tables using a for loop. > I need to display 34 html tables, so I figured a for loop will do. > Please show me an example of how to do that. for i in range(33): print "" for j in r

Re: mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
On Jul 4, 12:42 am, Ben Cartwright <[EMAIL PROTECTED]> wrote: > On Jul 3, 11:14 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > > > The following (pinched > > > > from Dive Into Python) seems to work perfectly in Idle, but > > > > falls at th

Re: mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
On Jul 3, 11:25 pm, Ben Cartwright <[EMAIL PROTECTED]> wrote: > On Jul 3, 9:43 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > The following (pinched > > from Dive Into Python) seems to work perfectly in Idle, but > > falls at the final hurdle when run as a

mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
I'm trying to use urllib2 to download a page (I'd rather use urllib, but I need to change the User-Agent header to look like a browser or G**gle won't send it to me, the big meanies). The following (pinched from Dive Into Python) seems to work perfectly in Idle, but falls at the final hurdle when r

Re: CGI python use "under a curse"

2007-05-06 Thread Adrian Smith
On May 7, 2:30 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 06 May 2007 21:30:16 -0700, Adrian Smith wrote: > It is NOT the same error. There are NO syntax errors in the script, there > is a runtime error. The so-called administrator is wrong: you can't use &g

CGI python use "under a curse"

2007-05-06 Thread Adrian Smith
While waiting for my paid-for web-hosting company to get back to me about my difficulties running python scripts on their servers... http://groups.google.com/group/comp.lang.python/browse_frm/thread/39b52bcf0dffec4c/4ff805bf283acc15?lnk=gst&q=adrian+smith&rnum=1&hl=en#4ff805bf283acc

Re: python cgi problem with textarea

2007-04-24 Thread Adrian Smith
On Apr 24, 8:00 pm, placid <[EMAIL PROTECTED]> wrote: > oops...i did read the problem description, but i when i tried the code > it worked for me and when i put spaces into the TextArea it wasn't > reflected correctly back. So i thought this was the problem. > > Adrian, can you still try replacing

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > i just tried it and its working. here it is > > http://yallara.cs.rmit.edu.au/~bevcimen/form.html > > maybe the internal server error is because mod_python isn't installed > assuming your using Apache as your web server Yeah, but it wouldn'

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 11:40 pm, Jim <[EMAIL PROTECTED]> wrote: > On Apr 22, 2:08 am, Adrian Smith <[EMAIL PROTECTED]> wrote:> ...and I > > get an internal server error if I have any spaces in the textarea, > > And what error appears in the server error log? I've just asked

python cgi problem with textarea

2007-04-21 Thread Adrian Smith
This may be more a cgi thing than a Python one, but I'm trying to get this page: http://adrian10.phpwebhosting.com/trial.html consisting basically of this: ...to print out the contents of the textarea with this cgi script: #!/usr/bin/python import cgi print "Content-type: text/html\n" form