backport_importlib-0...1
توضیحات
A script to backport the full importlib to 2.x
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | backport_importlib-0...1 |
| نام | backport_importlib |
| نسخه کتابخانه | 0...1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Eric Snow |
| ایمیل نویسنده | ericsnowcurrently@gmail.com |
| آدرس صفحه اصلی | https://bitbucket.org/ericsnowcurrently/backport_importlib/ |
| آدرس اینترنتی | https://pypi.org/project/backport_importlib/ |
| مجوز | UNKNOWN |
Introduced in Python 3.1, the importlib package provides a pure Python
implementation of the import machinery. It is also available on PyPI
as a [very] watered down backport.
The backport_importlib package provides a script that will backport the
full importlib package to 2.x. Keep in mind that the backport is quite
naive and likely incomplete. However, it passes the rudimentary tests
included in the script.
The script is optparse-based and the "-h" flag should be sufficient to
see how to use it. For information on how to use importlib, please
refer to the current 3.x stdlib documentation. The script will update
the importlib modules in-place, and will not install importlib for you.
Also, you have to provide your own copy of the 3.x importlib, which you
can get from hg.python.org/cpython (under Lib).
If you find cases where the backport could be improved please let me
know. Also, it probably won't work for Python earlier than 2.4, so
keep that in mind.
One last thing. A big reason that importlib was not released on PyPI
as a full backport was to encourage adoption of 3.x. I stand with
Brett on that choice. This tool is meant for the desparate only. In
truth, importlib provides very little that you don't already have in
the 2.x import machinery, so if you think you need it you're probably
wrong.
نحوه نصب
نصب پکیج whl backport_importlib-0...1:
pip install backport_importlib-0...1.whl
نصب پکیج tar.gz backport_importlib-0...1:
pip install backport_importlib-0...1.tar.gz