資源簡介
自己打包出來的 python27.zip 完整資源包。方便調用。 將 python27.dll 和本資源包放在程序目錄 即可免安裝運行 python。 可以自己精簡。
代碼片段和文件信息
#?Copyright?2007?Google?Inc.?All?Rights?Reserved.
#?Licensed?to?PSF?under?a?Contributor?Agreement.
“““Abstract?base?Classes?(ABCs)?according?to?PEP?3119.“““
import?types
from?_weakrefset?import?WeakSet
#?Instance?of?old-style?class
class?_C:?pass
_InstanceType?=?type(_C())
def?abstractmethod(funcobj):
????“““A?decorator?indicating?abstract?methods.
????Requires?that?the?metaclass?is?ABCmeta?or?derived?from?it.??A
????class?that?has?a?metaclass?derived?from?ABCmeta?cannot?be
????instantiated?unless?all?of?its?abstract?methods?are?overridden.
????The?abstract?methods?can?be?called?using?any?of?the?normal
????‘super‘?call?mechanisms.
????Usage:
????????class?C:
????????????__metaclass__?=?ABCmeta
????????????@abstractmethod
????????????def?my_abstract_method(self?...):
????????????????...
????“““
????funcobj.__isabstractmethod__?=?True
????return?funcobj
class?abstractproperty(property):
????“““A?decorator?indicating?abstract?properties.
????Requires?that?the?metaclass?is?ABCmeta?or?derived?from?it.??A
????class?that?has?a?metaclass?derived?from?ABCmeta?cannot?be
????instantiated?unless?all?of?its?abstract?properties?are?overridden.
????The?abstract?properties?can?be?called?using?any?of?the?normal
????‘super‘?call?mechanisms.
????Usage:
????????class?C:
????????????__metaclass__?=?ABCmeta
????????????@abstractproperty
????????????def?my_abstract_property(self):
????????????????...
????This?defines?a?read-only?property;?you?can?also?define?a?read-write
????abstract?property?using?the?‘long‘?form?of?property?declaration:
????????class?C:
????????????__metaclass__?=?ABCmeta
????????????def?getx(self):?...
????????????def?setx(self?value):?...
????????????x?=?abstractproperty(getx?setx)
????“““
????__isabstractmethod__?=?True
class?ABCmeta(type):
????“““metaclass?for?defining?Abstract?base?Classes?(ABCs).
????Use?this?metaclass?to?create?an?ABC.??An?ABC?can?be?subclassed
????directly?and?then?acts?as?a?mix-in?class.??You?can?also?register
????unrelated?concrete?classes?(even?built-in?classes)?and?unrelated
????ABCs?as?‘virtual?subclasses‘?--?these?and?their?descendants?will
????be?considered?subclasses?of?the?registering?ABC?by?the?built-in
????issubclass()?function?but?the?registering?ABC?won‘t?show?up?in
????their?MRO?(Method?Resolution?Order)?nor?will?method
????implementations?defined?by?the?registering?ABC?be?callable?(not
????even?via?super()).
????“““
????#?A?global?counter?that?is?incremented?each?time?a?class?is
????#?registered?as?a?virtual?subclass?of?anything.??It?forces?the
????#?negative?cache?to?be?cleared?before?its?next?use.
????_abc_invalidation_counter?=?0
????def?__new__(mcls?name?bases?namespace):
????????cls?=?super(ABCmeta?mcls).__new__(mcls?name?bases?namespace)
????????#?Compute?set?of?abstract?method?names
????????abstracts?=?set(name
?????????????????????for?name?value?in?namespace.items()
????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-27?12:02??DLLs\
?????文件???????71168??2017-09-16?20:20??DLLs\bz2.pyd
?????文件???????19790??2017-02-13?22:38??DLLs\py.ico
?????文件???????19790??2017-02-13?22:38??DLLs\pyc.ico
?????文件??????144384??2017-09-16?20:20??DLLs\pyexpat.pyd
?????文件???????10240??2017-09-16?20:20??DLLs\select.pyd
?????文件??????551424??2017-09-16?20:21??DLLs\sqlite3.dll
?????文件??????893952??2017-02-13?22:57??DLLs\tcl85.dll
?????文件????????8192??2017-02-13?22:57??DLLs\tclpip85.dll
?????文件?????1330688??2017-02-13?22:57??DLLs\tk85.dll
?????文件??????687104??2017-09-16?20:20??DLLs\unicodedata.pyd
?????文件????????9216??2017-09-16?20:20??DLLs\winsound.pyd
?????文件?????1106432??2017-09-16?20:23??DLLs\_bsddb.pyd
?????文件???????91648??2017-09-16?20:20??DLLs\_ctypes.pyd
?????文件???????16384??2017-09-16?20:20??DLLs\_ctypes_test.pyd
?????文件??????143360??2017-09-16?20:20??DLLs\_elementtree.pyd
?????文件?????1016832??2017-09-16?20:21??DLLs\_hashlib.pyd
?????文件???????18944??2017-09-16?20:20??DLLs\_msi.pyd
?????文件???????27648??2017-09-16?20:20??DLLs\_multiprocessing.pyd
?????文件???????46592??2017-09-16?20:21??DLLs\_socket.pyd
?????文件???????50688??2017-09-16?20:21??DLLs\_sqlite3.pyd
?????文件?????1411072??2017-09-16?20:21??DLLs\_ssl.pyd
?????文件???????41984??2017-09-16?20:20??DLLs\_testcapi.pyd
?????文件???????40960??2017-09-16?20:21??DLLs\_tkinter.pyd
?????目錄???????????0??2017-12-27?12:02??libs\
?????文件????????1646??2017-09-16?20:20??libs\bz2.lib
?????文件??????820536??2017-09-16?20:23??libs\libpython27.a
?????文件????????1714??2017-09-16?20:20??libs\pyexpat.lib
?????文件??????235712??2017-09-16?20:19??libs\python27.lib
?????文件????????1698??2017-09-16?20:20??libs\select.lib
?????文件????????1782??2017-09-16?20:20??libs\unicodedata.lib
............此處省略1802個文件信息
評論
共有 條評論