<div class="gmail_quote">TJG- that solved the printing issue!! Many thanks:)</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">Thanks to Chris and Jean Michel for your hints.</div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">On Tue, May 24, 2011 at 4:07 AM, <span dir="ltr"><<a href="mailto:python-list-request@python.org">python-list-request@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send Python-list mailing list submissions to<br>       <a href="mailto:python-list@python.org">python-list@python.org</a><br>
<br>To subscribe or unsubscribe via the World Wide Web, visit<br>       <a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>or, via email, send a message with subject or body 'help' to<br>
       <a href="mailto:python-list-request@python.org">python-list-request@python.org</a><br><br>You can reach the person managing the list at<br>       <a href="mailto:python-list-owner@python.org">python-list-owner@python.org</a><br>
<br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Python-list digest..."<br><br>Today's Topics:<br><br>  1. Re: Why did Quora choose Python for its development?<br>
     (Stefan Behnel)<br>  2. Re: Why did Quora choose Python for its development?<br>     (Octavian Rasnita)<br>  3. Re: Why did Quora choose Python for its development?<br>     (Chris Angelico)<br>  4. NEED HELP- read file contents, while loop to accept user<br>
     input, and        enter to exit (Cathy James)<br>  5. Re: NEED HELP- read file contents, while loop to accept user<br>     input,    and     enter to exit (Tim Golden)<br>  6. Re: NEED HELP- read file contents, while loop to accept user<br>
     input,    and enter to exit (Chris Angelico)<br>  7. Re: I installed Python 3 on Fedora 14 By Downloading<br>     python3.2 bziped  source tarball and install it according to the<br>     README,   Now How shall I uninstalled python 3.2? (harrismh777)<br>
  8. Re: Why did Quora choose Python for its development?<br>     (Daniel Kluev)<br>  9. Re: NEED HELP- read file contents, while loop to accept user<br>     input,    and enter to exit (Chris Rebert)<br> 10. Re: [Savoynet] More 'vast heavin' (Chris Angelico)<br>
<br><br>---------- Forwarded message ----------<br>From: Stefan Behnel <<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Tue, 24 May 2011 08:23:55 +0200<br>
Subject: Re: Why did Quora choose Python for its development?<br>Beliavsky, 20.05.2011 18:39:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I thought this essay on why one startup chose Python was interesting.<br></blockquote><br>Since everyone seems to be hot flaming at their pet languages in this thread, let me quickly say this:<br>
<br>Thanks for sharing the link.<br><br>Stefan<br><br><br><br><br>---------- Forwarded message ----------<br>From: "Octavian Rasnita" <<a href="mailto:orasnita@gmail.com">orasnita@gmail.com</a>><br>To: <<a href="mailto:python-list@python.org">python-list@python.org</a>><br>
Date: Tue, 24 May 2011 11:10:36 +0300<br>Subject: Re: Why did Quora choose Python for its development?<br>From: "Stefan Behnel" <<a href="mailto:stefan_ml@behnel.de" target="_blank">stefan_ml@behnel.de</a>><br>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Beliavsky, 20.05.2011 18:39:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I thought this essay on why one startup chose Python was interesting.<br></blockquote><br>Since everyone seems to be hot flaming at their pet languages in this thread, let me quickly say this:<br>
<br>Thanks for sharing the link.<br></blockquote><br><br>Maybe I have missed a message, but if I didn't, please provide that link.<br>I am always interested to find the best solutions.<br><br>Thanks.<br><br>Octavian<br>
<br><br><br><br>---------- Forwarded message ----------<br>From: Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Tue, 24 May 2011 18:20:44 +1000<br>
Subject: Re: Why did Quora choose Python for its development?<br>On Tue, May 24, 2011 at 6:10 PM, Octavian Rasnita <<a href="mailto:orasnita@gmail.com">orasnita@gmail.com</a>> wrote:<br>> From: "Stefan Behnel" <<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>><br>
>><br>>> Beliavsky, 20.05.2011 18:39:<br>>>><br>>>> I thought this essay on why one startup chose Python was interesting.<br>>><br>>> Since everyone seems to be hot flaming at their pet languages in this<br>
>> thread, let me quickly say this:<br>>><br>>> Thanks for sharing the link.<br>><br>><br>> Maybe I have missed a message, but if I didn't, please provide that link.<br>> I am always interested to find the best solutions.<br>
<br>At the beginning of the thread, three days and forty-odd messages ago,<br>this was posted:<br><br><a href="http://www.quora.com/Why-did-Quora-choose-Python-for-its-development" target="_blank">http://www.quora.com/Why-did-Quora-choose-Python-for-its-development</a><br>
<br>It's the reason for the thread title, regardless of the current thread<br>content :)<br><br>Chris Angelico<br><br><br><br>---------- Forwarded message ----------<br>From: Cathy James <<a href="mailto:nambo4jb@gmail.com">nambo4jb@gmail.com</a>><br>
To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Tue, 24 May 2011 03:31:37 -0500<br>Subject: NEED HELP- read file contents, while loop to accept user input, and enter to exit<br>
<div>dear mentor,</div>
<div> </div>
<div>I need help with my code:</div>
<div>1) my program won't display file contents upon opening</div>
<div>2) my program is not writing to file</div>
<div>3) my program is not closing when user presses enter- gow do I do this with a while loop?</div>
<div> </div>
<div>please see my attempt below and help:</div>
<div> </div>
<div>#1) open file and display current file contents:<br>f = open ('c:/testing.txt'', 'r')<br>f.readlines()</div>
<div>#2)  and 3) use while loop  to write user input to file, save to file, close when press enter:<br>while True:<br>    s = input ('enter name: ').strip()<br>    f = open ('c:/testing.txt', 'a')<br>
    if f.writable():<br>        f.write(s)<br>        break<br>    else:<br>        f = open ('c:/testing.txt', 'r')<br>        f.readlines()<br>        for line in f:<br>            print (line)</div><br>
<br>---------- Forwarded message ----------<br>From: Tim Golden <<a href="mailto:mail@timgolden.me.uk">mail@timgolden.me.uk</a>><br>To: <br>Date: Tue, 24 May 2011 09:46:11 +0100<br>Subject: Re: NEED HELP- read file contents, while loop to accept user input, and enter to exit<br>
On 24/05/2011 09:31, Cathy James wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">dear mentor,<br>I need help with my code:<br>1) my program won't display file contents upon opening<br>
</blockquote><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">#1) open file and display current file contents:<br>f = open ('c:/testing.txt'', 'r')<br>
f.readlines()<br></blockquote><br>If you're running this in an interactive interpreter, I would<br>expect it to show a list of lines (assuming c:/testing.txt has<br>something in it...). If you're running it as a program, though,<br>
it won't show anything: you need to actually output the result<br>of the expression f.readlines (). It only happens at the<br>interpreter as a development convenience:<br><br>f = open ("c:/testing.txt", "r")<br>
print f.readlines ()<br># or print (f.readlines ()) if you're in Python 3<br><br>TJG<br><br><br><br>---------- Forwarded message ----------<br>From: Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>><br>
To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Tue, 24 May 2011 18:46:32 +1000<br>Subject: Re: NEED HELP- read file contents, while loop to accept user input, and enter to exit<br>On Tue, May 24, 2011 at 6:31 PM, Cathy James <<a href="mailto:nambo4jb@gmail.com">nambo4jb@gmail.com</a>> wrote:<br>
>     s = input ('enter name: ').strip()<br><br>Are you using Python 2 or Python 3? If it's Python 2, this should be<br>raw_input().<br><br>>     f = open ('c:/testing.txt', 'a')<br>> ...<br>
>         f = open ('c:/testing.txt', 'r')<br><br>You may be having trouble here as a result of not closing the file and<br>then trying to reopen it.<br><br>Also, at some point you have to check if 's' (the user's inputted<br>
string) is empty. You can then leave the loop using the 'break'<br>statement.<br><br>Hope that helps! Best of luck with your homework.<br><br>Chris Angelico<br><br><br><br>---------- Forwarded message ----------<br>
From: harrismh777 <<a href="mailto:harrismh777@charter.net">harrismh777@charter.net</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Tue, 24 May 2011 03:47:31 -0500<br>Subject: Re: I installed Python 3 on Fedora 14 By Downloading python3.2 bziped source tarball and install it according to the README, Now How shall I uninstalled python 3.2?<br>
Varuna Seneviratna wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Now How shall I uninstalled<br>python 3.2?<br><br></blockquote><br>Now, how shall I remove Python 3.2 ?<br>
<br><br>...  very carefully.<br><br><br>It might be nice if there were a label in the Makefile so this would work:<br><br>  sudo make removeall<br><br>...  but alas,    why do you want to un-install Python3.2 ?<br><br><br>
<br><br><br><br><br><br>---------- Forwarded message ----------<br>From: Daniel Kluev <<a href="mailto:dan.kluev@gmail.com">dan.kluev@gmail.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>
Date: Tue, 24 May 2011 19:55:40 +1100<br>Subject: Re: Why did Quora choose Python for its development?<br>On Tue, May 24, 2011 at 5:00 PM, Octavian Rasnita <<a href="mailto:orasnita@gmail.com">orasnita@gmail.com</a>> wrote:<br>
> And you are telling that in Perl should be used an even more complicated and<br>> ugly syntax just for beeing the same as in Python just for showing that I am<br>> wrong, but I was comparing just the shortness and cleraness of the code.<br>
><br>> So, again, in Perl is just:<br>><br>> %d = @l;<br><br>Once again. Suppose we have array of key-value pairs (two-dimensional<br>array), `l`. In python, converting it to dict is as simple as d =<br>dict(l). In perl, %d = @l; produces meaningless value. Following your<br>
logic, this means that perl has ugly syntax.<br><br>--<br>With best regards,<br>Daniel Kluev<br><br><br><br>---------- Forwarded message ----------<br>From: Chris Rebert <<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>><br>
To: Cathy James <<a href="mailto:nambo4jb@gmail.com">nambo4jb@gmail.com</a>><br>Date: Tue, 24 May 2011 01:58:25 -0700<br>Subject: Re: NEED HELP- read file contents, while loop to accept user input, and enter to exit<br>
On Tue, May 24, 2011 at 1:31 AM, Cathy James <<a href="mailto:nambo4jb@gmail.com">nambo4jb@gmail.com</a>> wrote:<br>> dear mentor,<br>><br>> I need help with my code:<br><snip><br><br>In addition to what others have already said...<br>
<br>> please see my attempt below and help:<br>><br>> #1) open file and display current file contents:<br>> f = open ('c:/testing.txt'', 'r')<br>> f.readlines()<br>> #2)  and 3) use while loop  to write user input to file, save to file, close<br>
> when press enter:<br>> while True:<br>>     s = input ('enter name: ').strip()<br>>     f = open ('c:/testing.txt', 'a')<br>>     if f.writable():<br><br>Since you *just* opened the file in append mode, this condition will<br>
*always* be true (append mode implies writability), so your `else`<br>clause will *never* be executed.<br><br>>         f.write(s)<br>>         break<br>>     else:<br>>         f = open ('c:/testing.txt', 'r')<br>
>         f.readlines()<br>>         for line in f:<br>>             print (line)<br><br>Similar beginner questions would be best directed to Python's Tutor<br>mailinglist: <a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br>Cheers,<br>Chris<br><br><br><br>---------- Forwarded message ----------<br>From: Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>
Date: Tue, 24 May 2011 19:07:21 +1000<br>Subject: Re: [Savoynet] More 'vast heavin'<br>On Tue, May 24, 2011 at 7:03 PM, Larry Simons<br><<a href="mailto:larry@threelittlemaids.co.uk">larry@threelittlemaids.co.uk</a>> wrote:<br>
> On Tue 24/05/2011 04:11, Libby Moyer wrote:<br>>><br>>> And the rhymes in Mikado!<br>><br>> Are you referring to ablutioner, diminutioner and “you shun her” all rhymed<br>> with executioner?<br>><br>
<br>Can't deny that they're grin-worthy!<br><br>(Or groan-worthy, I always get those two mixed up.)<br><br>ChrisA<br><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</blockquote></div><br>