[Pythonjp-checkins] [python-doc-ja] 2 new revisions pushed by cocoa****@gmail***** on 2011-06-19 00:18 GMT

アーカイブの一覧に戻る

pytho****@googl***** pytho****@googl*****
2011年 6月 19日 (日) 09:18:56 JST


2 new revisions:

Revision: e44cbec27d63
Author:   cocoatomo <cocoa****@gmail*****>
Date:     Sat Jun 18 15:50:37 2011
Log:      removed comment-outed original sentences, and translate a little
http://code.google.com/p/python-doc-ja/source/detail?r=e44cbec27d63

Revision: 80afde6817b9
Author:   cocoatomo <cocoa****@gmail*****>
Date:     Sat Jun 18 17:02:48 2011
Log:      library/urllib2.rst translation completed. delete comment-outed  
senten...
http://code.google.com/p/python-doc-ja/source/detail?r=80afde6817b9

==============================================================================
Revision: e44cbec27d63
Author:   cocoatomo <cocoa****@gmail*****>
Date:     Sat Jun 18 15:50:37 2011
Log:      removed comment-outed original sentences, and translate a little
http://code.google.com/p/python-doc-ja/source/detail?r=e44cbec27d63

Modified:
  /library/urllib2.rst

=======================================
--- /library/urllib2.rst	Wed Apr 20 03:07:25 2011
+++ /library/urllib2.rst	Sat Jun 18 15:50:37 2011
@@ -34,11 +34,6 @@
     *data* は標準的な :mimetype:`application/x-www-form-urlencoded` 形式のバ 
ッファでなくてはなりません。
     :func:`urllib.urlencode` 関数はマップ型か2タプルのシーケンスを取り、この 
形式の文字列を返します。

-   .. The optional *timeout* parameter specifies a timeout in seconds for  
blocking
-      operations like the connection attempt (if not specified, the global  
default
-      timeout setting will be used).  This actually only works for HTTP,  
HTTPS,
-      FTP and FTPS connections.
-
     オプションの *timeout* 引数は、接続開始などのブロックする操作におけるタ 
イムアウト時間を秒数で指定します。
     (指定されなかった場合、グローバルのデフォルトタイムアウト時間が利用され 
ます)
     この引数は、 HTTP, HTTPS, FTP, FTPS 接続でのみ有効です。
@@ -48,7 +43,7 @@
     * :meth:`geturl` --- 取得されたリソースの URL を返します。
       主に、リダイレクトが発生したかどうかを確認するために利用します。

-   * :meth:`info` --- 取得されたページのヘッダーなどのメタ情報を、  
``httplib.HTTPMessage``
+   * :meth:`info` --- 取得されたページのヘッダーなどのメタ情報 
を、 :class:`mimetools.Message`
       インスタンスとして返します。
       (`Quick Reference to HTTP Headers  
<http://www.cs.tut.fi/~jkorpela/http.html>`_ を参照してください)

@@ -58,6 +53,8 @@
     グローバルハンドラの :class:`OpenerDirector`  
は、 :class:`UnknownHandler`
     を使って上記の問題が起きないようにしています)。

+   さらに、デフォルトでインストールされる :class:`ProxyHandler`
+
     .. versionchanged:: 2.6
        *timeout* 引数が追加されました。

@@ -106,10 +103,6 @@

     .. attribute:: code

-      .. An HTTP status code as defined in `RFC 2616  
<http://www.faqs.org/rfcs/rfc2616.html>`_.
-         This numeric value corresponds to a value found in the dictionary  
of
-         codes as found  
in :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`.
-
        `RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html>`_ に定義されている 
HTTPステータスコード。
        この数値型の値 
は、 :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`
        の辞書に登録されているコードに対応します。

==============================================================================
Revision: 80afde6817b9
Author:   cocoatomo <cocoa****@gmail*****>
Date:     Sat Jun 18 17:02:48 2011
Log:      library/urllib2.rst translation completed. delete comment-outed  
sentences.
http://code.google.com/p/python-doc-ja/source/detail?r=80afde6817b9

Modified:
  /library/urllib2.rst

=======================================
--- /library/urllib2.rst	Sat Jun 18 15:50:37 2011
+++ /library/urllib2.rst	Sat Jun 18 17:02:48 2011
@@ -1,18 +1,17 @@
  :mod:`urllib2` --- URL を開くための拡張可能なライブラリ
  =======================================================

+.. memo (@cocoatomo)
+
+   HTTPErrorProcessor, AbstractHTTPHandler が文書化されてないことについて
+   問い合わせ (2011.06.19)
+
  .. module:: urllib2
     :synopsis: URLを開く次世代ライブラリ
  .. moduleauthor:: Jeremy Hylton <jhylt****@users*****>
  .. sectionauthor:: Moshe Zadka <moshe****@users*****>


-.. .. note::
-   The :mod:`urllib2` module has been split across several modules in
-   Python 3.0 named :mod:`urllib.request` and :mod:`urllib.error`.
-   The :term:`2to3` tool will automatically adapt imports when converting
-   your sources to 3.0.
-
  .. note::
     :mod:`urllib2` モジュールは、Python  
3.0で :mod:`urllib.request`, :mod:`urllib.error`
     に分割されました。
@@ -53,7 +52,7 @@
     グローバルハンドラの :class:`OpenerDirector`  
は、 :class:`UnknownHandler`
     を使って上記の問題が起きないようにしています)。

-   さらに、デフォルトでインストールされる :class:`ProxyHandler`
+   さらに、プロキシが設定されているときは、デフォルトでインストールされ 
る :class:`ProxyHandler` がリクエストを処理するようになっています。

     .. versionchanged:: 2.6
        *timeout* 引数が追加されました。
@@ -172,9 +171,15 @@
  .. class:: ProxyHandler([proxies])

     このクラスはプロキシを通過してリクエストを送らせます。引数 *proxies* を 
与える場合、プロトコル名からプロキシの URL
-   へ対応付ける辞書でなくてはなりません。標準では、プロキシのリストを環境変 
数 *<protocol>_proxy*  から読み出します。
+   へ対応付ける辞書でなくてはなりません。標準では、プロキシのリストを環境変 
数 :envvar:`<protocol>_proxy`  から読み出します。
+
+   プロキシ環境変数が設定されていない場合は、 Windows 環境では、
+   レジストリのインターネット設定セクションからプロキシ設定を手に入れ、
+   Mac OS X 環境では、 OS X システム設定フレームワーク
+   (System Configuration Framework) からプロキシ情報を取得します。
+
     自動検出されたproxyを無効にするには、空の辞書を渡してください。
-
+

  .. class:: HTTPPasswordMgr()

@@ -413,8 +418,8 @@
     形式のメソッドを試します。メソッドが全て :const:`None` を返すと、さらに 
同じアルゴリズムを繰り返して :meth:`unknown_open`
     を呼び出します。

-   これらのメソッドの実装には、親となる :class:`OpenerDirector` インスタン 
スの :meth:`OpenDirector.open`
-   や :meth:`OpenDirector.error` といったメソッド呼び出しが入る場合があるの 
で注意してください。
+   これらのメソッドの実装には、親となる :class:`OpenerDirector` インスタン 
スの :meth:`~OpenDirector.open`
+   や :meth:`~OpenDirector.error` といったメソッド呼び出しが入る場合がある 
ので注意してください。

  #. :samp:`{protocol}_response` 形式のメソッドを持つ全てのハンドラに対してそ 
のメソッドを呼び出し、リクエストの
     ポストプロセスを行います。
@@ -856,10 +861,10 @@
  :class:`ProxyBasicAuthHandler` でプロキシ認証サポートを追加します。 ::

     proxy_handler =  
urllib2.ProxyHandler({'http': 'http://www.example.com:3128/'})
-   proxy_auth_handler = urllib2.HTTPBasicAuthHandler()
+   proxy_auth_handler = urllib2.ProxyBasicAuthHandler()
     proxy_auth_handler.add_password('realm', 'host', 'username', 'password')

-   opener = build_opener(proxy_handler, proxy_auth_handler)
+   opener = urllib2.build_opener(proxy_handler, proxy_auth_handler)
     # 今回は OpenerDirector をインストールするのではなく直接使います:
     opener.open('http://www.example.com/login.html')




Pythonjp-checkins メーリングリストの案内
アーカイブの一覧に戻る