accessing a text file

Discussion in 'Python' started by Baba, Sep 5, 2010.

  1. Baba

    Baba Guest

    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, word_list)


    thanks
    Baba
     
    Baba, Sep 5, 2010
    #1
    1. Advertising

  2. 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 same directory as the PY file.
    >
    > def is_valid_word(word, word_list)
    >
    >
    > thanks
    > Baba
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    Please do us a favor and at least try to figure things out on your
    own, rather than coming here every time you have a question. The very
    first result when you try searching "python read text file" is the
    section in the Python tutorial that explains how to do this.

    http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files
     
    Benjamin Kaplan, Sep 5, 2010
    #2
    1. Advertising

  3. Baba

    Seth Rees Guest

    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 the PY file.
    >
    > def is_valid_word(word, word_list)
    >
    >
    > thanks
    > Baba


    f = open('text.txt')
    data = f.read()
    # You may want to convert it to a list
    data = data.split()
    # Returns true if word is in data, false otherwise
    word in data
     
    Seth Rees, Sep 5, 2010
    #3
  4. Baba

    MRAB Guest

    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 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, word_list)
    >
     
    MRAB, Sep 5, 2010
    #4
  5. 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_word(word, word_list)
    >
    >
    > thanks
    > Baba



    Completely untested:

    def is_valid_word(word, filename):
    for line in open(filename):
    if word in line.split():
    return True
    return False
     
    Alexander Kapps, Sep 5, 2010
    #5
  6. Baba

    Zhu Sha Zang Guest

    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 stored in the same directory as the PY file.
    >>
    >> def is_valid_word(word, word_list)
    >>
    >>
    >> thanks
    >> Baba

    >
    >
    > Completely untested:
    >
    > def is_valid_word(word, filename):
    > for line in open(filename):
    > if word in line.split():
    > return True
    > return False


    Damn, <ironic>easy like C/C++/Java</ironic>

    Thanks a lot!


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.16 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAkyEIQAACgkQ35zeJy7JhCjgpgCgnnYCDj5Axohbhxi3txL6APEO
    ANgAniuvPnkRGpOm1ILysFg/nI43YOxg
    =W7aK
    -----END PGP SIGNATURE-----
     
    Zhu Sha Zang, Sep 6, 2010
    #6
  7. Baba

    Baba Guest

    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_list. let's assume
    > > the TXT file is stored in the same directory as the PY file.

    >
    > > def is_valid_word(word, word_list)

    >
    > > thanks
    > > Baba
    > > --
    > >http://mail.python.org/mailman/listinfo/python-list

    >
    > Please do us a favor and at least try to figure things out on your
    > own, rather than coming here every time you have a question. The very
    > first result when you try searching "python read text file" is the
    > section in the Python tutorial that explains how to do this.
    >
    > http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-...



    Hi Benjamin

    I did find that page prior to posting the question but i still wanted
    to have a second opinion to complement that info so as to make things
    easier The first line of my post clearly states that i am a beginner.
    It's nice to provide links which can help answer the question but
    please be so polite and keep personal comments for yourself.


    To all other respondants: thank you for your kind instructions and
    directions.


    Thanks
    Baba
     
    Baba, Sep 6, 2010
    #7
  8. Baba

    Baba Guest

    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
    > > the TXT file is stored in the same directory as the PY file.

    >
    > > def is_valid_word(word, word_list)

    >
    > > thanks
    > > Baba

    >
    >    f = open('text.txt')
    >    data = f.read()
    >    # You may want to convert it to a list
    >    data = data.split()
    >    # Returns true if word is in data, false otherwise
    >    word in data


    Thanks Seth!
     
    Baba, Sep 6, 2010
    #8
  9. 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) 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, word_list)
    > > >
    > > > thanks
    > > > Baba
    > > > --
    > > >
    > > >http://mail.python.org/mailman/listinfo/python-list

    > >
    > > Please do us a favor and at least try to figure things out on your
    > > own, rather than coming here every time you have a question. The very
    > > first result when you try searching "python read text file" is the
    > > section in the Python tutorial that explains how to do this.
    > >
    > > http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-...

    >
    > Hi Benjamin
    >
    > I did find that page prior to posting the question but i still wanted
    > to have a second opinion to complement that info so as to make things
    > easier The first line of my post clearly states that i am a beginner.
    > It's nice to provide links which can help answer the question but
    > please be so polite and keep personal comments for yourself.
    >


    That is of course perfectly legitimate. It would however have been polite to
    state that in the question. Show us that you're doing your homework, and not
    just using the list as a cheap path to having to think less yourself.

    Phrasing your post as "I would like to compare a ... I found the open()
    function here: [link]. Is this what I should use of is there any other/better
    way?" makes a completely different impression.

    Also, keeping personal comments to one's self is just not how it works. On a
    list like this especially, answers along the lines of "That's the way to do
    what you were asking for, but are you sure the question went into the right
    direction? Have you thought of [...]?" can often be very helpful.

    >
    > To all other respondants: thank you for your kind instructions and
    > directions.
    >
     
    Thomas Jollans, Sep 6, 2010
    #9
  10. Baba

    Baba Guest

    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?

    >
    > > > > 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, word_list)

    >
    > > > > thanks
    > > > > Baba
    > > > > --

    >
    > > > >http://mail.python.org/mailman/listinfo/python-list

    >
    > > > Please do us a favor and at least try to figure things out on your
    > > > own, rather than coming here every time you have a question. The very
    > > > first result when you try searching "python read text file" is the
    > > > section in the Python tutorial that explains how to do this.

    >
    > > >http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-...

    >
    > > Hi Benjamin

    >
    > > I did find that page prior to posting the question but i still wanted
    > > to have a second opinion to complement that info so as to make things
    > > easier The first line of my post clearly states that i am a beginner.
    > > It's nice to provide links which can help answer the question but
    > > please be so polite and keep personal comments for yourself.

    >
    > That is of course perfectly legitimate. It would however have been polite to
    > state that in the question. Show us that you're doing your homework, and not
    > just using the list as a cheap path to having to think less yourself.
    >
    > Phrasing your post as "I would like to compare a ... I found the open()
    > function here: [link]. Is this what I should use of is there any other/better
    > way?" makes a completely different impression.
    >
    > Also, keeping personal comments to one's self is just not how it works. On a
    > list like this especially, answers along the lines of "That's the way to do
    > what you were asking for, but are you sure the question went into the right
    > direction? Have you thought of [...]?" can often be very helpful.
    >
    >
    >
    > > To all other respondants: thank you for your kind instructions and
    > > directions.

    >
    >


    Thanks Thomas. Look up some of my questions this group and read
    through them and come back to tell me if a) i use this forum to learn
    without making any efforts myself or b) i use this forum to get
    started using the expertise of more knowledgeable programmers while at
    the same time particiapting. Anyway having this discussion is beside
    the point. Any Expert out there who thinks we beginners are some dumb
    idiots who are too stupid to think for themselves and are lucky to
    have a bunch of geniuses like you to help, get lost or make yourself a
    cup of tea but please give me a break from teaching me lessons...

    There's lots of nice people out there who are being awsemome by
    dedicating a bit of their time to some of our easy questions and it is
    them that i wish to send a BIG thanks! Much appreciated. I have made
    some good progress since starting to learn Python and this group has
    been great help!

    tnx
    Raoul
     
    Baba, Sep 6, 2010
    #10
  11. 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 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, word_list)

    >>
    >> > > > thanks
    >> > > > Baba
    >> > > > --

    >>
    >> > > >http://mail.python.org/mailman/listinfo/python-list

    >>
    >> > > Please do us a favor and at least try to figure things out on your
    >> > > own, rather than coming here every time you have a question. The very
    >> > > first result when you try searching "python read text file" is the
    >> > > section in the Python tutorial that explains how to do this.

    >>
    >> > >http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-....

    >>
    >> > Hi Benjamin

    >>
    >> > I did find that page prior to posting the question but i still wanted
    >> > to have a second opinion to complement that info so as to make things
    >> > easier The first line of my post clearly states that i am a beginner.
    >> > It's nice to provide links which can help answer the question but
    >> > please be so polite and keep personal comments for yourself.

    >>
    >> That is of course perfectly legitimate. It would however have been polite to
    >> state that in the question. Show us that you're doing your homework, and not
    >> just using the list as a cheap path to having to think less yourself.
    >>
    >> Phrasing your post as "I would like to compare a ... I found the open()
    >> function here: [link]. Is this what I should use of is there any other/better
    >> way?" makes a completely different impression.
    >>
    >> Also, keeping personal comments to one's self is just not how it works. On a
    >> list like this especially, answers along the lines of "That's the way to do
    >> what you were asking for, but are you sure the question went into the right
    >> direction? Have you thought of [...]?" can often be very helpful.
    >>
    >>
    >>
    >> > To all other respondants: thank you for your kind instructions and
    >> > directions.

    >>
    >>

    >
    > Thanks Thomas. Look up some of my questions  this group and read
    > through them and come back to tell me if a) i use this forum to learn
    > without making any efforts myself


    Just a quick point- when you ask someone for help, it's considered
    impolite to tell them what to do.

    I'd also point out that you gave no indication that you'd worked on
    this at all before posting it. In that regard, Thomas's concern seems
    completely justified to me.

    > or b) i use this forum to get
    > started using the expertise of more knowledgeable programmers while at
    > the same time particiapting.


    Again, Thomas's concern seems justified to me. Things would probably
    go more smoothly if you gave a better indication of what you had done
    so far on the problem in the future.

    > Anyway having this discussion is beside
    > the point. Any Expert out there who thinks we beginners are some dumb
    > idiots who are too stupid to think for themselves and are lucky to
    > have a bunch of geniuses like you to help, get lost or make yourself a
    > cup of tea but please give me a break from teaching me lessons...


    I don't think all beginners are idiots, or even most of them- but this
    isn't the right attitude to be taking. Both Thomas and myself thought
    that this was inappropriate enough to mention it, and if two people
    spoke up you can bet a lot more were thinking it quietly. My
    suggestion would be to moderate your approach and demonstrate what
    you've done so far (if only to increase the signal-to-noise ratio as
    your problems become more challenging) when posting. I'd also refrain
    from telling people to get lost; it doesn't make people happy to help
    you, you know?

    Geremy Condra
     
    geremy condra, Sep 6, 2010
    #11
  12. Baba

    Baba Guest

    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:
    > >> > > > 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, word_list)

    >
    > >> > > > thanks
    > >> > > > Baba
    > >> > > > --

    >
    > >> > > >http://mail.python.org/mailman/listinfo/python-list

    >
    > >> > > Please do us a favor and at least try to figure things out on your
    > >> > > own, rather than coming here every time you have a question. The very
    > >> > > first result when you try searching "python read text file" is the
    > >> > > section in the Python tutorial that explains how to do this.

    >
    > >> > >http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-...

    >
    > >> > Hi Benjamin

    >
    > >> > I did find that page prior to posting the question but i still wanted
    > >> > to have a second opinion to complement that info so as to make things
    > >> > easier The first line of my post clearly states that i am a beginner..
    > >> > It's nice to provide links which can help answer the question but
    > >> > please be so polite and keep personal comments for yourself.

    >
    > >> That is of course perfectly legitimate. It would however have been polite to
    > >> state that in the question. Show us that you're doing your homework, and not
    > >> just using the list as a cheap path to having to think less yourself.

    >
    > >> Phrasing your post as "I would like to compare a ... I found the open()
    > >> function here: [link]. Is this what I should use of is there any other/better
    > >> way?" makes a completely different impression.

    >
    > >> Also, keeping personal comments to one's self is just not how it works.. On a
    > >> list like this especially, answers along the lines of "That's the way to do
    > >> what you were asking for, but are you sure the question went into the right
    > >> direction? Have you thought of [...]?" can often be very helpful.

    >
    > >> > To all other respondants: thank you for your kind instructions and
    > >> > directions.

    >
    > > Thanks Thomas. Look up some of my questions  this group and read
    > > through them and come back to tell me if a) i use this forum to learn
    > > without making any efforts myself

    >
    > Just a quick point- when you ask someone for help, it's considered
    > impolite to tell them what to do.
    >
    > I'd also point out that you gave no indication that you'd worked on
    > this at all before posting it. In that regard, Thomas's concern seems
    > completely justified to me.
    >
    > > or b) i use this forum to get
    > > started using the expertise of more knowledgeable programmers while at
    > > the same time particiapting.

    >
    > Again, Thomas's concern seems justified to me. Things would probably
    > go more smoothly if you gave a better indication of what you had done
    > so far on the problem in the future.
    >
    > > Anyway having this discussion is beside
    > > the point. Any Expert out there who thinks we beginners are some dumb
    > > idiots who are too stupid to think for themselves and are lucky to
    > > have a bunch of geniuses like you to help, get lost or make yourself a
    > > cup of tea but please give me a break from teaching me lessons...

    >
    > I don't think all beginners are idiots, or even most of them- but this
    > isn't the right attitude to be taking. Both Thomas and myself thought
    > that this was inappropriate enough to mention it, and if two people
    > spoke up you can bet a lot more were thinking it quietly. My
    > suggestion would be to moderate your approach and demonstrate what
    > you've done so far (if only to increase the signal-to-noise ratio as
    > your problems become more challenging) when posting. I'd also refrain
    > from telling people to get lost; it doesn't make people happy to help
    > you, you know?
    >
    > Geremy Condra


    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. 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") making
    me aware of the etiquette that my post should also show that i have
    researched my question somehow and if his tone would have been
    mannered then we would not be having this discussion now. Ok now i
    need to go back to actual Pythoon learning, i'm getting distracted.

    Kind regards,
    Baba
     
    Baba, Sep 6, 2010
    #12
  13. Baba

    Baba Guest

    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 for a
    > person”.
    >
    > > In other words, we treat people as adults by default. I hope you'll
    > > continue to participate in that spirit.

    >
    > This is the main thrust of the message.
    >
    > --
    >  \        “What if the Hokey Pokey IS what it's all about?” —anonymous |
    >   `\                                                                   |
    > _o__)                                                                  |
    > Ben Finney


    Yes Master :)
     
    Baba, Sep 7, 2010
    #13
  14. Baba

    Baba Guest

    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 wording, I apologise. This should say “… is not respect for a
    > > person”.

    >
    > > > In other words, we treat people as adults by default. I hope you'll
    > > > continue to participate in that spirit.

    >
    > > This is the main thrust of the message.

    >
    > > --
    > >  \        “What if the Hokey Pokey IS what it's all about?” —anonymous |
    > >   `\                                                                   |
    > > _o__)                                                                  |
    > > Ben Finney

    >
    > Yes Master :)


    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 group)...so let
    me repeat that, to say "Please do us a favour and at least try to
    figure things out on your own" is in my view inappropriate. To me it
    sounds "Do me a favur and get lost". Can you not understand that? I
    accept that it might not have been meant that way but see,
    misunderstandings happen easily so a more subtle approach is a
    wothwhile effort. My point: i always encourage people to get down
    from their ivory towers and to connect to the people...yes they will
    sometimes be lazy but they are genuine and very respectful (unlike
    what you think)...

    no offence now ok, it's not all that serious...open your mind, let
    lose all that righteousness and let's enjoy life :)


    Baba
     
    Baba, Sep 7, 2010
    #14
  15. 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.
     
    Bruno Desthuilliers, Sep 7, 2010
    #15
  16. 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
    > group)...so let me repeat that, to say "Please do us a favour and at
    > least try to figure things out on your own" is in my view
    > inappropriate.


    You need to read this:

    http://www.catb.org/esr/faqs/smart-questions.html

    > To me it sounds "Do me a favur and get lost".


    No, it means "Do yourself a favor, learn how to do things yourself."

    Remember: you're then one asking people to give you something for
    free. It's not up to them to conform to your expectations, rather you
    need to conform to theirs. Otherwise, they'll just ignore you.

    --
    Grant Edwards grant.b.edwards Yow! FOOLED you! Absorb
    at EGO SHATTERING impulse
    gmail.com rays, polyester poltroon!!
     
    Grant Edwards, Sep 7, 2010
    #16
  17. Baba

    Baba Guest

    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 paramount (as long of course as it is related to the
    > > group)...so let me repeat that, to say "Please do us a favour and at
    > > least try to figure things out on your own" is in my view
    > > inappropriate.

    >
    > You need to read this:
    >
    >  http://www.catb.org/esr/faqs/smart-questions.html
    >
    > > To me it sounds "Do me a favur and get lost".

    >
    > No, it means "Do yourself a favor, learn how to do things yourself."
    >
    > Remember: you're then one asking people to give you something for
    > free. It's not up to them to conform to your expectations, rather you
    > need to conform to theirs.  Otherwise, they'll just ignore you.
    >
    > --
    > Grant Edwards               grant.b.edwards        Yow! FOOLED you!  Absorb
    >                                   at               EGO SHATTERING impulse
    >                               gmail.com            rays, polyester poltroon!!


    "Please do us a favour" sounds condescending to me at least but maybe
    we Europeans are a bit touchy...

    However the following Wiki excerpt seems to go in my direction:

    "When someone makes a mistake -- whether it's a spelling error or a
    spelling flame, a stupid question or an unnecessarily long answer --
    be kind about it. If it's a minor error, you may not need to say
    anything. Even if you feel strongly about it, think twice before
    reacting. Having good manners yourself doesn't give you license to
    correct everyone else. If you do decide to inform someone of a
    mistake, point it out politely, and preferably by private email rather
    than in public. Give people the benefit of the doubt; assume they just
    don't know any better. And never be arrogant or self-righteous about
    it."

    http://en.wikipedia.org/wiki/Netiquette

    Baba
     
    Baba, Sep 7, 2010
    #17
  18. On Wed, 08 Sep 2010 10:07:19 +1000, Ben Finney
    <> declaimed the following in
    gmane.comp.python.general:

    > 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 kinder, nor that it would be reasonable to do so.
    >

    Be glad I didn't respond to the OP... I don't know what version of
    Python they are using but with ActiveState 2.5.x under WinXP on my
    systems, my response would have been on the order of...

    "
    Did you try the help system? Takes less than 10 minutes with
    <aforesaid install> to pop up the Python help file, pick the search tab,
    and enter
    read a file
    in the search box, whereupon the first entry is chapter x.y.z of the
    included text /Dive Into Python/.
    "
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
     
    Dennis Lee Bieber, Sep 8, 2010
    #18
  19. Baba

    Baba Guest

    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 have been fully imparted in a way
    > that's kinder, nor that it would be reasonable to do so.
    >
    > To put it another way: if you feel offended by an utterance, then
    > insufficient kindness on the part of the speaker is not the only
    > explanation.
    >
    > --
    >  \      “Software patents provide one more means of controlling access |
    >   `\      to information. They are the tool of choice for the internet |
    > _o__)                                     highwayman.” —Anthony Taylor |
    > Ben Finney


    Hi Ben,

    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. It is just unfriendly
    to tell someone to go and look it up by themselves. Who is licensed to
    judge what can and cannot be posted as a question? A teacher of mine
    used to say: "There are no stupid questions, there are only stupid
    answers." It is arrogant to tell someone in a Forum to "look it up
    yourself ,this question is too basic". Can you not understand that
    accessing a file can seem daunting at first? Believe me, documentation
    can be offputting too when you only start with programming. Per se the
    beauty of forums like these is that there are human beings willing to
    make such tasks as finding out how to access a text file less 'scary'.
    Whoever thinks he or she has a license to tell someone to look up the
    answer by themselves should think again. I reckon the only license we
    have is not to answer at all. I acknowledge that Benjamin pointed me
    to the right place to find an answer but somehow the "Please do us a
    favour" sounded bit arrogant, as if he owned the place (same goes for
    all those who sided against me here: do you own this forum?)...i'd be
    glad if there was a python for beginners forum but in the meantime i
    have to say i find it awesome to have this forum to get help. It makes
    a BIG difference. So sorry if i upset anyone, we all have our opinions
    and get carried away and can be stubborn, i DO respect everyone in
    this forum and i think it goes bothways. I've learned a few things in
    this post...

    So now, to use Benjamin words: Please do me a favour and let's move
    on :)

    Baba

    Baba
     
    Baba, Sep 8, 2010
    #19
  20. Baba

    Paul Rubin Guest

    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 thoughtful
    and worth answering. But according to you that would be unfriendly.

    Another thing they could do is say nothing, but quietly configure their
    news-reading software to ignore your questions completely. Then none of
    your future questions would have any hope of being answered. Would that
    be less unfriendly, or more unfriendly?
     
    Paul Rubin, Sep 8, 2010
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?WWFtYQ==?=

    Accessing a TEXT file

    =?Utf-8?B?WWFtYQ==?=, Jan 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    308
    Mark Jen [MSFT]
    Jan 30, 2004
  2. Krish
    Replies:
    1
    Views:
    1,103
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 20, 2005
  3. vidhi
    Replies:
    1
    Views:
    555
    Matt Humphrey
    Jan 30, 2006
  4. vidhi
    Replies:
    0
    Views:
    361
    vidhi
    Jan 30, 2006
  5. walterbyrd
    Replies:
    7
    Views:
    324
    Asun Friere
    May 17, 2007
Loading...

Share This Page