Re: Fill In a Form Automatically
Friday 07 December 2007 22:06:23 tarihinde Victor Subervi şunları yazmıştı: > Hi; > I'm trying to fill in a Zope form automatically. I have this script, which > works great for creating the page...but how do I write to it? Use Mechanize [0]. [0] http://wwwsearch.sourceforge.net/mechanize/ -- Never learn by your mistakes, if you do you may never dare to try again. -- http://mail.python.org/mailman/listinfo/python-list
Re: reading list of list to a file
Sunday 09 December 2007 18:11:00 tarihinde caroliina şunları yazmıştı: > i made a list of lists but i cant write it into a file. how do i get the > first string in a sublist? An easy example: >>> a=[[1,2,3],[4,5,6]] >>> a[0][0] 1 >>> a[1][0] 4 >>> -- Never learn by your mistakes, if you do you may never dare to try again. -- http://mail.python.org/mailman/listinfo/python-list
Re: How to generate pdf file from an html page??
Wednesday 19 December 2007 17:40:17 tarihinde Terry Jones şunları yazmıştı: > > "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes: > > Grant> On 2007-12-19, abhishek <[EMAIL PROTECTED]> wrote: > >>> > Hi everyone, I am trying to generate a PDF printable format file from > >>> > an html page. Is there a way to do this using python. If yes then > >>> > which library and functions are required and if no then reasons why > >>> > it cant be done. > >>> > >>> Here's one way: > >>> > >>> --html2pdf.py-- > >>>--- #!/usr/bin/python > >>> import os,sys > >>> > >>> inputFilename,outputFilename = sys.argv[1:3] > >>> > >>> os.system("w3m -dump %s | a2ps -B --borders=no | ps2pdf - %s" % > >>> (inputFilename,outputFilename)) > > Note that this is highly insecure. outputFilename could be passed e.g., as > > /tmp/file.pdf; rm -fr /home/abhishek And the solution is to use subprocess [0] instead of os.system() [0] http://docs.python.org/lib/module-subprocess.html Regards, ismail -- Never learn by your mistakes, if you do you may never dare to try again. -- http://mail.python.org/mailman/listinfo/python-list
Re: Newbie question - what's the term for input/output to a web page?
Saturday 22 December 2007 03:03:47 tarihinde Rachel Garrett şunları yazmıştı: > I'd like to write a simple application that will accept input from the > user, go out to a particular web page, and submit the user's input to > the website. The results that are displayed by the web page should > then be sent back to the application. > > This seems like something where I could find some easy examples, but I > don't know what to search for -- I keep getting results for API's, web > services, etc. > > Any pointers, please? Search for mechanize. /ismail -- Never learn by your mistakes, if you do you may never dare to try again. -- http://mail.python.org/mailman/listinfo/python-list