Re: accessing a text file

2010-09-16 Thread Baba
On Sep 9, 10:09 pm, Nobody nob...@nowhere.com wrote: On Wed, 08 Sep 2010 03:30:00 -0700, Baba wrote: Who is licensed to judge what can and cannot be posted as a question? Exactly the same set of people who are licensed to judge what can and cannot be posted as an answer. If you don't like

Re: accessing a text file

2010-09-09 Thread Nobody
On Wed, 08 Sep 2010 03:30:00 -0700, Baba wrote: Who is licensed to judge what can and cannot be posted as a question? Exactly the same set of people who are licensed to judge what can and cannot be posted as an answer. If you don't like the responses you get here, you could try posting your

Re: accessing a text file

2010-09-09 Thread Paul Rubin
Nobody nob...@nowhere.com writes: If you don't like the responses you get here, you could try posting your questions on 4chan. If nothing else, that will give you a whole new perspective on what an unfriendly response really looks like. +1 QOTW --

Re: accessing a text file

2010-09-08 Thread Baba
On 8 sep, 02:07, Ben Finney ben+pyt...@benfinney.id.au wrote: Baba raoul...@gmail.com writes: However the following Wiki excerpt seems to go in my direction: No, it doesn't. It advises that people show kindness; as I've been arguing, that's exactly what you were shown. You haven't shown how

Re: accessing a text file

2010-09-08 Thread Paul Rubin
Baba raoul...@gmail.com writes: It is just unfriendly to tell someone to go and look it up by themselves. Someone seeing too many unthoughtful questions from you might tell you to look it up yourself, in the hopes of getting you to change your questioning style, so that your future questions

Re: accessing a text file

2010-09-08 Thread Baba
On 8 sep, 12:46, Paul Rubin no.em...@nospam.invalid wrote: Baba raoul...@gmail.com writes: It is just unfriendly to tell someone to go and look it up by themselves. Someone seeing too many unthoughtful questions from you might tell you to look it up yourself, in the hopes of getting you to

Re: accessing a text file

2010-09-08 Thread Paul Rubin
Baba raoul...@gmail.com writes: But where do you draw the line? Can we not just let people ask questions regardless? And let those answer who want to and those who don't just ignore the question? That seems so much easier to me. The first few times, it's easy to ignore the questions. After a

Re: accessing a text file

2010-09-08 Thread Grant Edwards
On 2010-09-08, Baba raoul...@gmail.com wrote: Thanks for your feedback. My question is: Who owns this forum? If we all do then we are allowed to post questions that are simple and that could otherwise be answered by doing research. Of course you're allowed to post such questions. And people

Re: accessing a text file

2010-09-08 Thread Bruno Desthuilliers
Baba a écrit : Dear xyz, Your question can easily be researched online. We suggest you give it a try and to look it up yourself. This will be beneficial both to you and to us. We do encourage to ask questions only when they have been researched first. On usenet - as well as on most technical

Re: accessing a text file

2010-09-08 Thread Baba
On 8 sep, 14:39, Paul Rubin no.em...@nospam.invalid wrote: Baba raoul...@gmail.com writes: But where do you draw the line? Can we not just let people ask questions regardless? And let those answer who want to and those who don't just ignore the question? That seems so much easier to me.

Re: accessing a text file

2010-09-08 Thread Bar Shirtcliff
| Hi Paul | | If i look where i was 4 weeks ago and the progress i made in learning | Python i am quite delighted. This forum has helped me and i appreciate | it. I don't think i will ever tell a beginner to do me a favour and | to look things up by himself nor will i use the RTFM line (refering

Re: accessing a text file

2010-09-08 Thread Bar Shirtcliff
| HEREow can you be learning so much python if you're constantly expressing typo there. I'm not sure how that happens, sometimes, but it's an untimely abbrev-expansion, in emacs VM. I meant to say, How can you... Cheers, Bar -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing a text file

2010-09-08 Thread MRAB
On 08/09/2010 23:56, Bar Shirtcliff wrote: | HEREow can you be learning so much python if you're constantly expressing typo there. I'm not sure how that happens, sometimes, but it's an untimely abbrev-expansion, in emacs VM. I meant to say, How can you... An unkind soul would say that it's

Re: accessing a text file

2010-09-08 Thread Ben Finney
Baba raoul...@gmail.com writes: Thanks for your feedback. My question is: Who owns this forum? If we all do then we are allowed to post questions that are simple and that could otherwise be answered by doing research. That's a rather subservient perspective. Why are you seeking permission to

Re: accessing a text file

2010-09-08 Thread Ben Finney
Grant Edwards inva...@invalid.invalid writes: I'm sure you'd prefer that everything was handed to you for free on a silver platter with a side order of beer and cookies. I'd prefer I was 20 years younger and 30 pounds lighter. Life's tough that way. Hell no. I'd prefer to have the total of my

Re: accessing a text file

2010-09-08 Thread Grant Edwards
On 2010-09-09, Ben Finney ben+pyt...@benfinney.id.au wrote: Grant Edwards inva...@invalid.invalid writes: I'm sure you'd prefer that everything was handed to you for free on a silver platter with a side order of beer and cookies. I'd prefer I was 20 years younger and 30 pounds lighter. Life's

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 02:18, Ben Finney ben+pyt...@benfinney.id.au wrote: Ben Finney ben+pyt...@benfinney.id.au writes: We value respect for people here, and that's what you've been shown consistently. But respect for opinions, or for delicacy about learning, is not welcome here. Sloppy wording, I

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 13:39, Baba raoul...@gmail.com wrote: On 7 sep, 02:18, Ben Finney ben+pyt...@benfinney.id.au wrote: Ben Finney ben+pyt...@benfinney.id.au writes: We value respect for people here, and that's what you've been shown consistently. But respect for opinions, or for delicacy

Re: accessing a text file

2010-09-07 Thread Bruno Desthuilliers
Baba a écrit : (snip) If i had received a friendly response from Benjamin (as opposed to Please do us a favor and at least try to figure things out on your own) According to usenet standards and given your initial question, this is a _very_ friendly answer. --

Re: accessing a text file

2010-09-07 Thread Ben Finney
Baba raoul...@gmail.com writes: to say Please do us a favour and at least try to figure things out on your own is in my view inappropriate. That's what the person wanted you to see. How would you prefer that exact information to be imparted to you? How could it have been communicated so that

Re: accessing a text file

2010-09-07 Thread Grant Edwards
On 2010-09-07, Baba raoul...@gmail.com wrote: Sloppy wording, I apologise. This should say: If you find the question you're reading too easy then just don't answer. Noone is the owner of a democratic forum where freedom to ask the question one likes is paramount (as long of course as it is

Re: accessing a text file

2010-09-07 Thread geremy condra
On Tue, Sep 7, 2010 at 4:39 AM, Baba raoul...@gmail.com wrote: On 7 sep, 02:18, Ben Finney ben+pyt...@benfinney.id.au wrote: Ben Finney ben+pyt...@benfinney.id.au writes: We value respect for people here, and that's what you've been shown consistently. But respect for opinions, or for

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 16:50, Grant Edwards inva...@invalid.invalid wrote: On 2010-09-07, Baba raoul...@gmail.com wrote: Sloppy wording, I apologise. This should say: If you find the question you're reading too easy then just don't answer. Noone is the owner of a democratic forum where freedom to ask

Re: accessing a text file

2010-09-07 Thread Ben Finney
Baba raoul...@gmail.com writes: However the following Wiki excerpt seems to go in my direction: No, it doesn't. It advises that people show kindness; as I've been arguing, that's exactly what you were shown. You haven't shown how the information being imparted could have been fully imparted in

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 00:01, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Sep 5, 2010 at 5:47 PM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 00:04, Seth Rees s...@sthrs.me wrote: On 09/05/10 16:47, Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's

Re: accessing a text file

2010-09-06 Thread Thomas Jollans
On Monday 06 September 2010, it occurred to Baba to exclaim: On 6 sep, 00:01, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Sep 5, 2010 at 5:47 PM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 16:58, Thomas Jollans tho...@jollybox.de wrote: On Monday 06 September 2010, it occurred to Baba to exclaim: On 6 sep, 00:01, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Sep 5, 2010 at 5:47 PM, Baba raoul...@gmail.com wrote: level: beginner how can i access

Re: accessing a text file

2010-09-06 Thread geremy condra
On Mon, Sep 6, 2010 at 8:53 AM, Baba raoul...@gmail.com wrote: On 6 sep, 16:58, Thomas Jollans tho...@jollybox.de wrote: On Monday 06 September 2010, it occurred to Baba to exclaim: On 6 sep, 00:01, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Sep 5, 2010 at 5:47 PM, Baba

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 18:14, geremy condra debat...@gmail.com wrote: On Mon, Sep 6, 2010 at 8:53 AM, Baba raoul...@gmail.com wrote: On 6 sep, 16:58, Thomas Jollans tho...@jollybox.de wrote: On Monday 06 September 2010, it occurred to Baba to exclaim: On 6 sep, 00:01, Benjamin Kaplan

Re: accessing a text file

2010-09-06 Thread Ben Finney
Baba raoul...@gmail.com writes: Thanks Jeremy, i will take your advice on board! Noone likes to be taught lessons i think so it is only normal that i reacted. Please reconsider this response. Many of us use this forum precisely because we *do* like to be taught lessons. If you don't want to be

Re: accessing a text file

2010-09-06 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: We value respect for people here, and that's what you've been shown consistently. But respect for opinions, or for delicacy about learning, is not welcome here. Sloppy wording, I apologise. This should say “… is not respect for a person”. In

accessing a text file

2010-09-05 Thread Baba
level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as the PY file. def is_valid_word(word,

Re: accessing a text file

2010-09-05 Thread Nitin Pawar
may be something like this f = open (file,r) data = f.read() f.close if word in data: print word, is present in file On Mon, Sep 6, 2010 at 3:17 AM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string

Re: accessing a text file

2010-09-05 Thread Seth Rees
On 09/05/10 16:47, Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as

Re: accessing a text file

2010-09-05 Thread Benjamin Kaplan
On Sun, Sep 5, 2010 at 5:47 PM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is

Re: accessing a text file

2010-09-05 Thread MRAB
On 05/09/2010 22:47, Baba wrote: level: beginner how can i access the contents of a text file in Python? That's a very basic question. I suggest you read a tutorial such as Dive Into Python: http://diveintopython.org/toc/index.html i would like to compare a string (word) with the

Re: accessing a text file

2010-09-05 Thread Alexander Kapps
Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as the PY file. def

Re: accessing a text file

2010-09-05 Thread Zhu Sha Zang
Em 05-09-2010 19:06, Alexander Kapps escreveu: Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is