parse text file
Hi: I am new to this list and new to Python. I have a text file that looks like: 4 50 3 900 " or "]" sign. For example: 4 50 3 900 7 400 ... 9 70 How can I do this? Thank you William __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list
python scripts with IIS
Hello: I am trying to configure IIS to work with Python scripts: I've added in the Home Directory/Configuration the .py extention and the path to the python.exe as: c:\Python24\python.exe %S %S The python script has 1 line: print "This is a test for python scripts with IIS" When I launch the file using IE I get the message: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: This is a test for python scripts with IIS How can I remove the CGI error? Thank you William Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping-- http://mail.python.org/mailman/listinfo/python-list
Re: python scripts with IIS
Thank you, William - Original Message From: Rolf van de Krol <[EMAIL PROTECTED]> To: python-list@python.org Sent: Saturday, January 19, 2008 5:33:59 PM Subject: Re: python scripts with IIS Adding the following lines before your print statement should do the trick. IIS complains about the headers, so adding headers should help. print "Content-Type: text/html"# HTML is following print # blank line, end of headers william paul wrote: > > Hello: > > I am trying to configure IIS to work with Python scripts: > > I've added in the Home Directory/Configuration the .py extention and > the path to the python.exe as: c:\Python24\python.exe %S %S > The python script has 1 line: > print "This is a test for python scripts with IIS" > > When I launch the file using IE I get the message: > > *CGI Error* > The specified CGI application misbehaved by not returning a complete > set of HTTP headers. The headers it did return are: > > This is a test for python scripts with IIS > > How can I remove the CGI error? > > Thank you > > William > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > it now. > <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> -- http://mail.python.org/mailman/listinfo/python-list Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- http://mail.python.org/mailman/listinfo/python-list
arange randomly words in a list
Hi: I have a list that looks like: name = name1 name2 name3 name4 and I would like to be able to arrange randomly this list, like: name = name 2 name 1 name3 name4 name = name4 name2 name1 name3 I have tried with random.shuffle, but still no good result May I get an example? Thank you, William __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list