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w5Xy+Is;tGlaO|8?|n#HSG*9MAA^ z-tjAbCfyZFa$PE}4Jt?48m^3xrOIHtW<4hs|K6od*3W!3=ctIZnIY^aUa}aMm9!<# zttDegaU|gg>a@XHIzu=FII;nHiKNN@7DiMG;S}IpbfRKdBmpj)x;u)lQ@F9VQ~4L( J13bJOe*ilZLs$R+ diff --git a/docs/doctrees/index.doctree b/docs/doctrees/index.doctree index 91e894cd24d19566d38fa62410ca192ee9357dc1..ea1d07c27a1f5747e254d844675de1666703f138 100644 GIT binary patch delta 165 zcmZ3bvtDO|xu{2x86yKjs90KNPHKE+UU6zsNoIatd}>}|Qch}0kvUMZBb2)+u^cXB z0Tl9P4CPHJ%`J#8PAw_P%u6pWvYcEcDkp3Ol4A&E&P*vTvIeqii)<#Z7F80q1+(pd qWQKf(c7|eYk^STcqFM?LK#|xYM<5x>R+O3s(&hwK>I@`Hlk@;nl`fV5 delta 139 zcmZ3lvr1=!x#(mYQAsT`Mh1qCQ0}6{^7z!e#H5_mlp=GWkT+u}Z%S!yL40v)Nl9j2 zdU27(73J$ZwulCTY!Z3`qb SAX%EE2LP^TB<%nI diff --git a/docs/doctrees/polyloader.doctree b/docs/doctrees/polyloader.doctree index c93a2294d337722b8f71d62fb01adefb98585fed..17439f9e17ef32a7dd50b5c6349fc48d6acc5bc8 100644 GIT binary patch delta 210 zcmZ3exlD6|rm#nm8Y2Tks90KNPHKE+UU6zsNoIatd}>}|Qch}0kvdSaBb2)+u^cX> z0Tl9P4CPHJ%`J#8PAw_P%u6pW(wv+lEGMi5l4A&E&P*vT(gw0?i*zQ>71ra^1+q08 zi}b)k`jc-8ON$x+*%`{UMTS6HBSSSdLnF4xXfmgWwXiW*l?g~*F+&%m#&mMHh?asG aP$ag<97u+;6{V(u?63eUwFHu-NqPXN&Nklw delta 184 zcmZ3cxlnV1rtoAvVM#4DMh1qCQ0}6{^7z!e#H5_mlp=MYkT+u}Z%S!yL40v)Nl9j2 zdU27)7(J$aF^9-j`7t=U+l3l`Fwd{0 D*QK4{qYh&S#+QOY0 z88Q)I8K9ocTw;4z8O RBukU@0KHsW6aWAK diff --git a/docs/doctrees/todo.doctree b/docs/doctrees/todo.doctree index b9c622d386fa1c2d1f6d46fe635ebc37cff099da..2bafad4bbd12791a1802e0cba5a5f82373e56912 100644 GIT binary patch delta 128 zcmaDa_fc-cT0W-2b(7cfNvf>x2<0wHERRpkOH9g1O)1>q%^1p?Qkq*3Uz}P}l9`uY zT)1)aD?VxcP2LQl%$X_0g_~;&w}c86mnIdLWR{ecWaj6^=OyN*78h= tNlcAO& gS6jG!vI)Ps$d1^;ouO<+sc9g6yJ`z}mnP`}01hrR1poj5 delta 125 zcmew;_g-$pTE5Ba`6N}=b%b&kC6>ph<|QWOq^1 sZa-cC delta 152 zcmZov{jaiNhhS=`SXyRIYJ6s1acWUXW`16LYF=VePHIZwv5rvgqQr7I|F}0}C~rz> zZb5u;YDr0EUV3ri3BS^$P|@Pb+@$=R__X}|lDzzq)cE3(#G;bIlim!W%$X_0g{Nu@ wPfwN?lHxs6TX;4@HbXN*zP9k(WH%vok@K;I7ed*JQqw@{F4h)aDoxS@0C|Hx8~^|S diff --git a/docs/eli5.html b/docs/eli5.html index 3b2a380..15c768d 100644 --- a/docs/eli5.html +++ b/docs/eli5.html @@ -47,6 +47,14 @@ +ELI5: Explain Like I’m Five!¶
++Meta Paths¶
+TODO
++-Path Hooks¶
+TODO
+--Path Hooks¶
-TODO
--Meta Paths¶
-TODO
-+Module Specifications¶
TODO
++@@ -77,11 +81,12 @@Pkgutil Iterate Modules¶
+TODO
Table Of Contents
- ELI5: Explain Like I’m Five!
+- Meta Paths
+- Path Hooks
- Finders
- Loaders
-- Path Hooks
-- Meta Paths
- Module Specifications
+- Pkgutil Iterate Modules
This Page
diff --git a/docs/objects.inv b/docs/objects.inv index 1e958d2..9b3ca15 100644 --- a/docs/objects.inv +++ b/docs/objects.inv @@ -2,4 +2,6 @@ # Project: polyloader # Version: 0.1.0 # The remainder of this file is compressed using zlib. -xڍ0For filesystem-based modules (which is 99% of them) Python’s importer only understands one loader type per directory. It’s not possible to store code or data written in something other than Python in the same -directory with Python module code and load it via import. +directory with Python module code and load both via import.The former requires a certain degree of abstraction and thought. For the latter, most people ignore the problem and load module configuration @@ -86,7 +86,7 @@ Hy or Coconut in a framework like Django, Flask or Glitch.
What’s the real problem?¶
The real problem is that Python’s traditional extensions, .py, .pyc/.pyo, and .so/.dll files, are hard-coded in Python. In -Python 2, they’re in the imp builtin; In Python 3, they’re defined +Python 2, they’re in the _imp builtin; In Python 3, they’re defined in a private section of importlib. Either way, they’re not accessible for modification and extension.
This problem is made harder by the pkglib module, which is part of diff --git a/docs/searchindex.js b/docs/searchindex.js index 495186d..2c80bdd 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{load:[9,5],all:[9,5],code:[9,5],just:[7,5],move:5,multilingu:9,syntax:[7,9],veri:9,through:[1,5],abil:5,follow:7,discoveri:9,annoyingli:9,find:[9,5],languag:9,suffix:[8,10],access:[9,5],onli:[9,5],depend:5,execut:[9,5],smart_str:5,flask:9,point:5,had:[9,5],except:[9,5],than:9,resort:5,add:[7,5],program:[9,5],those:9,appli:5,reason:5,sens:5,folder:5,main:7,app:7,match:5,take:5,real:0,fly:5,them:[9,5],sourc:0,"return":5,string:[9,5],thei:[9,5],get:9,handl:[9,5],initi:5,util:5,framework:[9,5],ast_compil:7,mechan:[9,10],fall:9,front:9,now:[7,5],archiv:5,requir:9,name:5,tri:5,term:9,like:5,specif:5,hook:5,edit:7,anyth:5,list:[9,5],iter:5,method:5,"try":5,collect:5,either:[9,1],each:[9,5],did:5,unicod:5,page:0,mean:[9,5],compil:[7,8,10],everyth:[7,5],been:9,set:10,natur:5,hard:9,resourc:5,assumpt:5,see:5,meta:5,bare:5,stabl:0,download:1,http:1,fullnam:5,todo:4,hamper:9,librari:[7,9,5],out:[9,5],variabl:[9,5],index:0,insid:5,goe:5,unready_str:5,someth:9,abl:5,per:9,dll:9,current:[9,10,5],figur:[9,5],leav:[10,5],limit:9,content:[0,2,5],"public":1,metadata:5,altern:5,elfsternberg:1,elimin:9,object:[9,5],run:[9,10,1,5],extend:9,web:5,importerror:5,inspect:9,usag:0,privat:9,standard:[9,10],extens:9,job:5,base:[9,5],modif:9,believ:[9,5],repositori:1,found:5,releas:0,from:[0,5],process:[1,5],modifi:5,problem:0,interpret:9,importlib:9,about:5,last:[9,10,5],would:5,befor:5,freedom:5,could:[9,5],success:5,manag:[7,9,10],turn:9,degre:9,instanc:10,context:10,constructor:5,databas:5,typic:5,view:7,com:1,first:[9,5],oper:5,via:9,user:5,finder:5,directli:9,extra:5,win:9,arrai:5,independ:5,encod:5,pkglib:9,automat:10,loader:5,mochi:7,glitch:9,api:5,yaml:9,latter:9,instal:0,guid:1,facil:5,your:[7,1],git:1,ready_str:5,pkgutil:5,wai:[9,5],script:7,top:7,scan:5,two:[9,5],"long":9,github:1,avail:5,start:5,json:9,handler:5,master:1,statement:[9,5],time:[0,5],call:5,type:9,until:5,store:[9,5],more:[9,5],"function":[9,5],setup:1,lot:5,offer:5,termin:1,peopl:9,copi:1,back:9,remot:5,part:[9,5],understand:9,translat:5,scope:[10,5],line:7,former:9,written:[7,9,5],reset:8,made:[9,5],word:9,describ:5,possibl:9,launcher:7,remov:10,work:[7,5],harder:9,intern:[9,5],can:[7,9,1,5],easier:5,defin:9,"__init__":5,minimum:5,compile_fil:7,whatev:9,assum:10,report:9,modul:5,find_modul:5,heart:9,coconut:9,featur:9,constant:5,file:[9,5],creat:10,give:5,almost:5,certain:9,"abstract":9,filenam:5,ani:5,activ:10,packag:2,pip:1,hy_compil:7,have:[7,9,1,5],tarbal:1,synopsi:0,curl:1,sai:0,getmoduleinfo:9,alwai:9,develop:[9,5],want:[7,9,5],thing:9,make:5,expos:9,when:[9,5],same:9,write:[7,9,5],funni:5,builtin:9,other:9,read:5,split:5,which:[9,10,5],subdirectori:5,command:[9,1,5],you:[7,9,1,5],mochi_compil:7,enabl:9,even:5,imp:9,recogn:9,again:9,configur:9,clone:1,after:9,upon:[10,5],solut:0,most:9,larg:5,plan:7,pyo:9,pair:10,construct:9,pyc:9,data:9,"class":[9,5],tradit:9,repo:1,lifetim:10,don:1,whose:5,filesystem:[9,5],anywher:5,well:7,fine:9,django:[7,9,5],thought:9,heterogen:9,exampl:7,ignor:9,thi:[0,1,5],english:0,onc:1,model:[7,5],section:9,dot:[9,5],usual:9},objtypes:{"0":"py:module","1":"py:function"},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},filenames:["index","installation","modules","contributing","eli5","details","authors","usage","polyloader","readme","todo","history"],titles:["Welcome to polyloader","Installation","polyloader","<no title>","ELI5: Explain Like I’m Five!","Details on Import and Polyloader","<no title>","Usage","polyloader package","Synopsis","<no title>","<no title>"],objects:{"":{polyloader:[8,0,0,"-"]},polyloader:{reset:[8,1,1,""],install:[8,1,1,""]}},titleterms:{sai:9,old:5,modul:[4,8],meta_path:5,system:5,hook:4,meta:4,tabl:0,stabl:1,still:5,what:[9,5],from:1,welcom:[0,5],explain:4,solut:9,detail:5,content:8,how:5,between:5,"new":5,instal:1,finder:4,real:9,sourc:1,synopsi:9,python:5,english:9,usag:7,differ:5,eli5:[4,5],path_hook:5,indic:0,"import":5,releas:1,path:[4,5],loader:4,look:5,search:5,like:4,specif:4,packag:8,directori:5,doe:5,matter:5,polyload:[0,2,5,8],thi:9,time:9,five:4,problem:9,where:5,know:5}}) \ No newline at end of file +Search.setIndex({envversion:42,terms:{load:[9,5],all:[9,5],code:[9,5],just:[7,5],move:5,multilingu:9,syntax:[7,9,5],veri:9,through:[1,5],abil:5,follow:7,discoveri:9,annoyingli:9,find:[9,5],languag:9,suffix:[8,10],access:[9,5],onli:[9,5],depend:5,execut:[9,5],smart_str:5,flask:9,point:5,had:[9,5],except:[9,5],than:[9,5],resort:5,add:[7,5],program:[9,5],those:9,appli:5,reason:5,sens:5,folder:5,main:7,app:7,match:5,take:5,real:0,fly:5,them:[9,5],sourc:0,"return":5,string:[9,5],thei:[9,5],get:9,handl:[9,5],initi:5,util:5,framework:[9,5],ast_compil:7,mechan:[9,10],fall:9,front:9,now:[7,5],archiv:5,requir:9,name:5,tri:5,term:9,like:5,specif:5,hook:5,edit:7,anyth:5,list:[9,5],iter:5,method:5,"try":5,collect:5,either:[9,1],each:[9,5],did:5,unicod:5,page:0,mean:[9,5],compil:[7,8,10],everyth:[7,5],been:9,set:10,natur:5,hard:9,resourc:5,assumpt:5,see:5,meta:5,bare:5,stabl:0,download:1,http:1,fullnam:5,todo:4,hamper:9,librari:[7,9,5],out:[9,5],variabl:[9,5],index:0,insid:5,goe:5,unready_str:5,someth:9,"_imp":9,abl:5,per:9,dll:9,current:[9,10,5],figur:[9,5],leav:[10,5],limit:9,content:[0,2,5],"public":1,metadata:5,altern:5,elfsternberg:1,elimin:9,object:[9,5],run:[9,10,1,5],extend:9,web:5,importerror:5,inspect:9,usag:0,privat:9,standard:[9,10],extens:9,job:5,base:[9,5],modif:9,believ:[9,5],repositori:1,found:5,releas:0,from:[0,5],process:[1,5],modifi:5,problem:0,interpret:9,importlib:9,both:9,about:5,last:[9,10,5],would:5,befor:5,freedom:5,could:[9,5],success:5,manag:[7,9,10],turn:9,degre:9,instanc:10,context:10,constructor:5,databas:5,typic:5,view:7,com:1,first:[9,5],oper:5,via:9,user:5,finder:5,directli:9,extra:5,win:9,arrai:5,independ:5,encod:5,pkglib:9,automat:10,loader:5,mochi:7,glitch:9,api:5,yaml:9,latter:9,instal:0,guid:1,facil:5,your:[7,1],git:1,ready_str:5,pkgutil:5,wai:[9,5],script:7,top:7,scan:5,two:[9,5],"long":9,github:1,avail:5,start:5,json:9,handler:5,master:1,statement:[9,5],time:[0,5],call:5,type:9,tell:5,store:[9,5],more:[9,5],"function":[9,5],setup:1,lot:5,offer:5,termin:1,peopl:9,copi:1,back:9,remot:5,part:[9,5],understand:9,translat:5,scope:[10,5],line:7,former:9,written:[7,9,5],reset:8,kind:5,made:[9,5],word:9,describ:5,possibl:9,launcher:7,remov:10,work:[7,5],harder:9,intern:[9,5],can:[7,9,1,5],until:5,defin:9,easier:5,minimum:5,compile_fil:7,whatev:9,assum:10,report:9,modul:5,find_modul:5,heart:9,coconut:9,featur:9,constant:5,file:[9,5],creat:10,give:5,almost:5,certain:9,"abstract":9,filenam:5,ani:5,activ:10,"__init__":5,packag:2,pip:1,hy_compil:7,have:[7,9,1,5],tarbal:1,synopsi:0,curl:1,sai:0,getmoduleinfo:9,alwai:9,develop:[9,5],want:[7,9,5],thing:9,make:5,expos:9,when:[9,5],same:9,write:[7,9,5],funni:5,builtin:9,other:9,read:5,split:5,which:[9,10,5],subdirectori:5,command:[9,1,5],you:[7,9,1,5],mochi_compil:7,enabl:9,even:5,recogn:9,again:9,configur:9,clone:1,after:9,upon:[10,5],solut:0,most:9,larg:5,plan:7,pyo:9,pair:10,construct:9,pyc:9,data:9,"class":[9,5],tradit:9,repo:1,lifetim:10,don:1,whose:5,filesystem:[9,5],anywher:5,well:7,fine:9,django:[7,9,5],thought:9,heterogen:9,exampl:7,ignor:9,thi:[0,1,5],english:0,onc:1,model:[7,5],section:9,dot:[9,5],usual:9},objtypes:{"0":"py:module","1":"py:function"},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},filenames:["index","installation","modules","contributing","eli5","details","authors","usage","polyloader","readme","todo","history"],titles:["Welcome to polyloader","Installation","polyloader","<no title>","ELI5: Explain Like I’m Five!","Details on Import and Polyloader","<no title>","Usage","polyloader package","Synopsis","<no title>","<no title>"],objects:{"":{polyloader:[8,0,0,"-"]},polyloader:{reset:[8,1,1,""],install:[8,1,1,""]}},titleterms:{sai:9,old:5,look:5,modul:[4,8],meta_path:5,system:5,hook:4,meta:4,tabl:0,stabl:1,still:5,what:[9,5],from:1,pkgutil:4,explain:4,solut:9,detail:5,content:8,how:5,between:5,"new":5,instal:1,finder:4,real:9,sourc:1,synopsi:9,python:5,english:9,usag:7,differ:5,eli5:[4,5],path_hook:5,indic:0,"import":5,releas:1,path:[4,5],loader:4,welcom:[0,5],search:5,like:4,specif:4,packag:8,directori:5,iter:4,doe:5,matter:5,polyload:[0,2,5,8],thi:9,time:9,five:4,problem:9,where:5,know:5}}) \ No newline at end of file diff --git a/docs/src/details.rst b/docs/src/details.rst index fc64dd2..b5e8692 100644 --- a/docs/src/details.rst +++ b/docs/src/details.rst @@ -108,4 +108,5 @@ path where you believe Python modules can be found, and list through them. This facility is useful for large frameworks where a user wants to add new commands, or new objects, or new operations; Django uses this facility a lot! The ``pkgutil`` library depends upon Finders being able -to iterate their contents. +to iterate their contents, and with the filesystem iterator, that means +being able to tell there's more than one kind of syntax in a directory. diff --git a/docs/src/eli5.rst b/docs/src/eli5.rst index 667777f..2bfa0f4 100644 --- a/docs/src/eli5.rst +++ b/docs/src/eli5.rst @@ -1,6 +1,20 @@ ELI5: Explain Like I'm Five! ============================ +.. _eli5-metapaths: + +Meta Paths +========== + +TODO + +.. _eli5-pathhooks: + +Path Hooks +========== + +TODO + .. _eli5-finders: Finders @@ -15,23 +29,16 @@ Loaders TODO -.. _eli5-pathhooks: - -Path Hooks -========== - -TODO - -.. _eli5-metapaths: - -Meta Paths -========== - -TODO - .. _eli5-specs: Module Specifications ===================== TODO + +.. _eli5-iterate-modules: + +Pkgutil Iterate Modules +======================= + +TODO