newsgroup lib

Discussion in 'Python' started by Jesper Olsen, Jan 28, 2004.

  1. Jesper Olsen

    Jesper Olsen Guest

    Is there a python module for accessing newsgroup articles?

    Something similar to urllib for downloading web pages...

    Cheers
    Jesper
    Jesper Olsen, Jan 28, 2004
    #1
    1. Advertising

  2. Jesper Olsen

    deelan Guest

    Jesper Olsen wrote:

    > Is there a python module for accessing newsgroup articles?
    >
    > Something similar to urllib for downloading web pages...

    nttplib?
    see: <http://www.python.org/doc/current/lib/module-nntplib.html>



    --
    email: goldicus1970 AT yahoo.it
    blog: http://www.deelan.com/
    deelan, Jan 28, 2004
    #2
    1. Advertising

  3. Jesper Olsen

    Gerrit Holl Guest

    Jesper Olsen wrote:
    > Is there a python module for accessing newsgroup articles?


    You're looking for nntplib

    http://www.python.org/dev/doc/devel/lib/module-nntplib.html

    For example,

    >>> s = NNTP('news.cwi.nl')
    >>> resp, count, first, last, name = s.group('comp.lang.python')
    >>> print 'Group', name, 'has', count, 'articles, range', first, 'to',
    >>> last

    Group comp.lang.python has 59 articles, range 3742 to 3803
    >>> resp, subs = s.xhdr('subject', first + '-' + last)
    >>> for id, sub in subs[-10:]: print id, sub

    ....
    3792 Re: Removing elements from a list while iterating...
    3793 Re: Who likes Info files?
    3794 Emacs and doc strings
    3795 a few questions about the Mac implementation
    3796 Re: executable python scripts
    3797 Re: executable python scripts
    3798 Re: a few questions about the Mac implementation
    3799 Re: PROPOSAL: A Generic Python Object Interface for Python C
    Modules
    3802 Re: executable python scripts
    3803 Re: \POSIX{} wait and SIGCHLD
    >>> s.quit()

    '205 news.cwi.nl closing connection. Goodbye.'

    Gerrit.

    --
    5. If a judge try a case, reach a decision, and present his judgment in
    writing; if later error shall appear in his decision, and it be through
    his own fault, then he shall pay twelve times the fine set by him in the
    case, and he shall be publicly removed from the judge's bench, and never
    again shall he sit there to render judgement.
    -- 1780 BC, Hammurabi, Code of Law
    --
    PrePEP: Builtin path type
    http://people.nl.linux.org/~gerrit/creaties/path/pep-xxxx.html
    Asperger's Syndrome - a personal approach:
    http://people.nl.linux.org/~gerrit/english/
    Gerrit Holl, Jan 28, 2004
    #3
  4. Jesper Olsen

    Jesper Olsen Guest

    Jesper Olsen, Jan 29, 2004
    #4
    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. James Yong
    Replies:
    0
    Views:
    548
    James Yong
    Sep 12, 2005
  2. Praetorian

    Need odbc32.lib odbccp32.lib

    Praetorian, Apr 20, 2006, in forum: C++
    Replies:
    1
    Views:
    1,382
    mlimber
    Apr 20, 2006
  3. Durduran
    Replies:
    10
    Views:
    536
    Durduran
    Jul 30, 2007
  4. Replies:
    3
    Views:
    2,753
  5. Christopher
    Replies:
    4
    Views:
    319
    Christopher
    Nov 1, 2007
Loading...

Share This Page