🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #28308

Re: Pytania początkującego cz. 3

#28308
From: hubert depesz lubaczewski
Date: Tue, 15 Nov 2011 14:07
53 lines
2890 bytes
On 2011-11-15, Mariusz Kruk <Mariusz.Kruk@epsilon.eu.org> wrote:
> email.charset.Charset.header_encode?

nie sprawdzałem teraz, ale nazwa *encode* sugeruje dosyć mocno, że nie.

>>tu pytanie: czy jest jakieś miejsce/metoda/algorytm/cokolwiek dzięki
>>któremu mając "w ręku" obiekt mogę przeczytać do niego manuala - tzn. do
>>jego klasy, bez zgadywania co muszę zaimportować?
>
> #v+
> $ ipython
> Python 2.6.7 (r267:88850, Aug  3 2011, 15:19:01) 
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.10.2 -- An enhanced Interactive Python.
> ?         -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help      -> Python's own help system.
> object?   -> Details about 'object'. ?object also works, ?? prints more.
>
> In [1]: import email
>
> In [2]: email.message_from_file?
> Type:           function
> Base Class:     <type 'function'>
> String Form:    <function message_from_file at 0x912d8b4>
> Namespace:      Interactive
> File:           /usr/lib/python2.6/email/__init__.py
> Definition:     email.message_from_file(fp, *args, **kws)
> Docstring:
>     Read a file and parse its contents into a Message object model.                                                                                                                     
>     
>     Optional _class and strict are passed to the Parser constructor.
>
> #v-
>
> O to chodzi?

ok. a jak teraz dostać dokumentację do tego "Message"? to jest
problemem, nie samo message_from_file, tylko dokumentacja do tego co ta
funkcja zwraca - czyli klasy "Message".

aby było jasne - ja tę dokumentację znalazłem (a dokładniej to na
#python na ircu mi pokazali), ale chodzi mi o algorytm jak z powyższego
się domyślić, że muszę:
1. import email.message
2. help( email.message.Message )

depesz

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/
Technical Details
Message-ID: <u98ap8-uiv.ln1@depesz.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!depesz.com!not-for-mail
References: <9gr8p8-v4r.ln1@depesz.com> <slrnjc463f.9rq.Mariusz.Kruk@epsilon.rdc.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!depesz.com!not-for-mail
From: hubert depesz lubaczewski <depesz@depesz.com>
Newsgroups: pl.comp.lang.python
Subject: Re: Pytania początkującego cz. 3
Date: Tue, 15 Nov 2011 15:07:26 +0100
Organization: depesz Software
Lines: 53
Message-ID: <u98ap8-uiv.ln1@depesz.com>
References: <9gr8p8-v4r.ln1@depesz.com> <slrnjc463f.9rq.Mariusz.Kruk@epsilon.rdc.pl>
Reply-To: depesz@depesz.com
NNTP-Posting-Host: andy.depesz.com
Mime-Version: 1.0
X-Trace: news.onet.pl 1321366803 27348 88.198.47.100 (15 Nov 2011 14:20:03 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Tue, 15 Nov 2011 14:20:03 +0000 (UTC)
User-Agent: slrn/pre1.0.0-18 (Linux)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit