Re: accessing a text file

2010-09-16 Thread Baba
On Sep 9, 10:09 pm, Nobody 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 the respons

Re: accessing a text file

2010-09-09 Thread Paul Rubin
Nobody 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 -- http://mail.python.org/mailman/listinfo/python-list

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 qu

Re: accessing a text file

2010-09-08 Thread Grant Edwards
On 2010-09-09, Ben Finney wrote: > Grant Edwards 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 t

Re: accessing a text file

2010-09-08 Thread Ben Finney
Grant Edwards 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 life experience and

Re: accessing a text file

2010-09-08 Thread Ben Finney
Baba 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 ask questions? W

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'

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 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 Baba
On 8 sep, 14:39, Paul Rubin wrote: > Baba 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

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 Grant Edwards
On 2010-09-08, Baba 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 are allowed to i

Re: accessing a text file

2010-09-08 Thread Paul Rubin
Baba 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 few more times,

Re: accessing a text file

2010-09-08 Thread Baba
On 8 sep, 12:46, Paul Rubin wrote: > Baba 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,

Re: accessing a text file

2010-09-08 Thread Paul Rubin
Baba 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 will be more though

Re: accessing a text file

2010-09-08 Thread Baba
On 8 sep, 02:07, Ben Finney wrote: > Baba 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

Re: accessing a text file

2010-09-07 Thread Ben Finney
Baba 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 a way that's kinde

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 16:50, Grant Edwards wrote: > On 2010-09-07, Baba 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 param

Re: accessing a text file

2010-09-07 Thread geremy condra
On Tue, Sep 7, 2010 at 4:39 AM, Baba wrote: > On 7 sep, 02:18, Ben Finney wrote: >> Ben Finney 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 word

Re: accessing a text file

2010-09-07 Thread Grant Edwards
On 2010-09-07, Baba 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 related to the >

Re: accessing a text file

2010-09-07 Thread Ben Finney
Baba 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 it was not misun

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. -- http://mail.python.org/mailman

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 13:39, Baba wrote: > On 7 sep, 02:18, Ben Finney wrote: > > > > > > > Ben Finney 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 wordi

Re: accessing a text file

2010-09-07 Thread Baba
On 7 sep, 02:18, Ben Finney wrote: > Ben Finney 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 f

Re: accessing a text file

2010-09-06 Thread Ben Finney
Ben Finney 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 other words, we treat peop

Re: accessing a text file

2010-09-06 Thread Ben Finney
Baba 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 taught lessons,

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 18:14, geremy condra wrote: > On Mon, Sep 6, 2010 at 8:53 AM, Baba wrote: > > On 6 sep, 16:58, Thomas Jollans wrote: > >> On Monday 06 September 2010, it occurred to Baba to exclaim: > > >> > On 6 sep, 00:01, Benjamin Kaplan wrote: > >> > > On Sun, Sep 5, 2010 at 5:47 PM, Baba wrote:

Re: accessing a text file

2010-09-06 Thread geremy condra
On Mon, Sep 6, 2010 at 8:53 AM, Baba wrote: > On 6 sep, 16:58, Thomas Jollans wrote: >> On Monday 06 September 2010, it occurred to Baba to exclaim: >> >> >> >> > On 6 sep, 00:01, Benjamin Kaplan wrote: >> > > On Sun, Sep 5, 2010 at 5:47 PM, Baba wrote: >> > > > level: beginner >> >> > > > how

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 16:58, Thomas Jollans wrote: > On Monday 06 September 2010, it occurred to Baba to exclaim: > > > > > On 6 sep, 00:01, Benjamin Kaplan wrote: > > > On Sun, Sep 5, 2010 at 5:47 PM, Baba wrote: > > > > level: beginner > > > > > how can i access the contents of a text file in Python? > >

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 wrote: > > On Sun, Sep 5, 2010 at 5:47 PM, Baba wrote: > > > level: beginner > > > > > > how can i access the contents of a text file in Python? > > > > > > i would like to compare a string (word) wi

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 00:04, Seth Rees 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 assume

Re: accessing a text file

2010-09-06 Thread Baba
On 6 sep, 00:01, Benjamin Kaplan wrote: > On Sun, Sep 5, 2010 at 5:47 PM, 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_l

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

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 is_valid

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 con

Re: accessing a text file

2010-09-05 Thread Benjamin Kaplan
On Sun, Sep 5, 2010 at 5:47 PM, 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 s

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 director

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 wrote: > level: beginner > > how can i access the contents of a text file in Python? > > i would like to compare a string (word) wit

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, wo