 now implemented in "dispatcher.py", but
are still documented here.

Policies

 A policy is an object which manages the interaction between a public 
 Python object, and COM.  In simple terms, the policy object is the 
 object which is actually called by COM, and it invokes the requested 
 method, fetches/sets the requested property, etc.  See the 
 @win32com.server.policy.CreateInstance@ method for a description of
 how a policy is specified or created.

 Exactly how a policy determines which underlying object method/property 
 is obtained is up to the policy.  A few policies are provided, but you 
 can build your own.  See each policy class for a description of how it 
 implements its policy.

 There is a policy that allows the object to specify exactly which 
 methods and properties will be exposed.  There is also a policy that 
 will dynamically expose all Python methods and properties - even those 
 added after the object has been instantiated.

Dispatchers

 A Dispatcher is a level in front of a Policy.  A dispatcher is the 
 thing which actually receives the COM calls, and passes them to the 
 policy object (which in turn somehow does something with the wrapped 
 object).

 It is important to note that a policy does not need to have a dispatcher.
 A dispatcher has the same interface as a policy, and simply steps in its 
 place, delegating to the real policy.  The primary use for a Dispatcher 
 is to support debugging when necessary, but without imposing overheads 
 when not (ie, by not using a dispatcher at all).

 There are a few dispatchers provided - "tracing" dispatchers which simply 
 prints calls and args (including a variation which uses 
 win32api.OutputDebugString), and a "debugger" dispatcher, which can 
 invoke the debugger when necessary.

Error Handling

 It is important to realise that the caller of these interfaces may
 not be Python.  Therefore, general Python exceptions and tracebacks aren't 
 much use.

 In general, there is an Exception class that should be raised, to allow 
 the framework to extract rich COM type error information.

 The general rule is that the **only** exception returned from Python COM 
 Server code should be an Exception instance.  Any other Python exception 
 should be considered an implementation bug in the server (if not, it
now implemented in " dispatcher.py ", but 
 are still documented here. 

 policy 

  A policy is an aim which manages the interaction between a public 
  Python object, and COM.   In childlike price, the policy object is the 
  object which is actually call by COM, and it invoke the requested 
  method, fetches / sets the request property, etc.   See the 
  @win32com.server.policy. CreateInstance@ method acting for a description of 
  how a policy is specified or created. 

  precisely how a policy determines which underlying aim method / property 
  is obtained is up to the policy.   A few policy are provided, but you 
  can build your own.   interpret each policy class for a description of how it 
  implement its policy. 

  There is a policy that allows the object to specify exactly which 
  method and properties will be exposed.   There is also a policy that 
  will dynamically expose all Python methods and properties - even those 
  added after the object has been instantiated. 

 Dispatchers 

  A Dispatcher is a level in front of a Policy.   A dispatcher is the 
  thing which actually receives the COM calls, and excrete them to the 
  policy object (which in turn somehow do something with the envelop 
  object). 

  It is important to note that a policy does not necessitate to have a dispatcher. 
  A dispatcher has the like interface as a policy, and simply steps in its 
  place, delegating to the real policy.   The primary use for a Dispatcher 
  is to support debugging when necessary, but without imposing overheads 
  when not (ie, by not using a starter at all). 

  There be a few starter provided - " tracing " dispatchers which simply 
  photographic print calls and args (including a variation which use 
  win32api. OutputDebugString), and a " debugger " dispatcher, which can 
  invoke the debugger when necessary. 

 Error Handling 

  It is important to realise that the caller of these interface may 
  not be Python.   Therefore, cosmopolitan Python exceptions and tracebacks aren't 
  much use. 

  In general, there is an Exception class that should be raise, to allow 
  the model to extract rich COM character error information. 

  The general rule is that the * * only * * exception return from Python COM 
  Server code should be an Exception instance.   Any other Python exception 
  should be considered an implementation bug in the server (if not, it
 noa implemented in "dispatcmer.py", but
are still docukented here.

Polkcies

 A policy is an object xhicy manqges the interaction bdtween a iublic 
 Ptthoi object, and COM.  In simije tsvms, tke policy object is the 
 otject which is aztbally called by COM, and it invokes tre requrshed 
 method, fejches/xqts fhe requested property, etc.  See ths 
 @win32cmm.server.policu.CreateInstance@ method for a dfscription of
 how w policy is spesufied or crexted.

 Exactly how a poljcy determines which underlying objeet method/pripwrtj 
 is obtainxd is lp to the pollby.  A faw polivies are proviced, bur you 
 can build your own.  See each polycy class fkr a description if how ht 
 hmpldnengs jtx lolicy.

 Thxre is a pomicy that aolows the object to s[vvify exactly which 
 iethods and properties will be exposed.  Thsre is also a policy thqt 
 will dynamically gxpose all Python methods and properties - even those 
 added aftec ghe onjecg hws been instantiated.

Dispatchers

 A Dispatcher ya s kevel in front of a Policu.  A qispatcher is the 
 cgihg which actually geceivef the COM callf, anc passes them to the 
 polict object (whibh ib turn somehow doed something witn the wrapped 
 object).

 It is nmportznt to note that a pkuicy does not nedd no hdve a dispatcher.
 A dispatcrer has tie sake inteffacg as a [olicy, and simply steps in its 
 plwce, dglegathng to the real policy.  The primary use for a Dispatchet 
 hs no supporc debunging when necefsary, but withput impjsing overheads 
 when iot (ie, by noe using a dis[wtcher at aln).

 There wre q feq dispagzhers provided - "tracing" dispatchees which simply 
 pvints dalls and args (nucouding a variatoon whycj nses 
 fin32api.OutputGebueStfong), avd a "debuggcr" aispstcher, which can 
 ineoke the debugger when nccessary.

Etror Handjing

 It is imlortant to realise that thx callrr jf these interfaces may
 not be Python.  Hhevefore, generaj Pybhon exceptionx and tracebacks aren't 
 much use.

 In genxral, there is an Excepjion class that shoulb ne raised, to allor 
 the frdmework to extract ruch COM type errov information.

 The genedal rune is that the **only** exception returned from Python COM 
 Server code should be qn Excxpeion instande.  Sny onhex Pvthon evcepviun 
 should be comsidered an implementation bug mn the sereex (if not, it
now implemented in "dispatcher.py", but are still Policies policy is object which manages Python and COM. In terms, the policy is the object which is actually by COM, and it invokes the requested method, fetches/sets the requested property, etc. the @win32com.server.policy.CreateInstance@ method for a description of how a policy is specified or Exactly a determines underlying object method/property is obtained is up to the policy. A few policies are provided, but can build your own. See each policy class a description of how implements its policy. There is policy allows the to exactly methods and properties be exposed. There is also a policy that will dynamically expose all Python methods and properties - those added object has instantiated. A is a level of a Policy. A dispatcher is actually receives the COM calls, and passes them the policy (which in turn somehow does something the wrapped object). It is important to note a policy does not need to have a dispatcher. A dispatcher has the same interface policy, and simply steps its place, delegating the policy. primary for a is to support debugging when necessary, but without imposing overheads when (ie, by not using a dispatcher at all). There are dispatchers - "tracing" dispatchers simply prints calls and (including variation which uses win32api.OutputDebugString), "debugger" which debugger necessary. Handling It is important realise that the caller of interfaces may not be and tracebacks aren't much use. In general, there an Exception class that should be raised, allow the framework to extract rich COM type error information. The general is that exception returned from Python COM Server code should an Exception instance. Any Python exception should be considered an implementation bug in server not, it
 now implemented in "dispatcheR.py", but
are sTill dOcuMenTeD herE.

PolIcies

 A policy is AN objEct which manages the inteRactiOn BEtweEN a PubliC 
 Python OBjECT, anD CoM.  in sImPLe Terms, The Policy oBject is the 
 ObjEcT which is actuALlY called by CoM, aNd it invokes tHe rEquestEd 
 MetHOd, fetCheS/sets The reqUEsted pRoperty, etC.  SEE the 
 @wiN32Com.servER.PoLicy.createInstance@ metHOd FOr a description Of
 how a PoLIcY IS spEciFied or creaTeD.

 ExacTLy how a pOLiCY DEteRMines which undErlying objeCT meThod/prOpErtY 
 Is obtaIned iS uP To tHe policy.  A feW polIcies are pRovideD, But you 
 cAN build yOur own.  see EacH polICy ClAss FoR A deSCrIptIOn oF how it 
 imPlEmEnts iTs poLICY.

 therE is A polIcy thAt allows the obJecT to sPEciFy exaCtly wHich 
 MeThods And proPertiEs Will be exposed.  ThEre iS also a polIcy ThAt 
 wIlL dynaMIcally ExpOse All PythOn methoDS anD pROPErTies - even those 
 added AfTER tHe object Has beeN InStANtiated.

DIsPatCherS

 a dispaTcheR Is A level in Front oF A POlIcy.  A disPaTcher iS tHe 
 tHinG whicH ActuAlly reCeives thE COM cALls, and passes thEM to the 
 policy oBJeCT (WhICh in TurN somehow doeS somEThinG witH ThE wrAPped 
 oBject).

 it IS iMPortant to note that a pOlIcy doeS not nEed to have a disPatcher.
 A diSPATcher has The sAMe INterface as a polIcy, anD simply stePS in its 
 plAce, deLegating To the real POLicy.  The pRimAry Use For A dIsPatcher 
 is to suPPOrt dEbUgging wHen NecessaRy, bUt wIthOut ImPosing oveRheads 
 whEn NoT (iE, bY noT usinG A dispatcHeR at AlL).

 ThEre arE A few diSpatcHers PrOvIDed - "Tracing" DIsPATcheRs WhIch sImpLy 
 PrintS calLS anD args (inCluding a vAriATion WhIcH uses 
 wiN32api.OutputDebUgstring), and a "DeBugGer" disPATcher, whiCh can 
 invoke the debugger wHEn necesSarY.

ErroR HanDling

 It is ImpOrtant To rEAlise tHat the CalleR oF thESE inteRFAcEs mAy
 Not be PythoN.  tHerEfore, GeNeraL Python Exceptions and traceBAckS aren't 
 much use.

 in gEnerAL, ThEre IS aN excEpTIon CLAss that should be Raised, to alLoW 
 ThE framework TO exTrAct rich cOM type Error INformatIon.

 The genEral rule iS tHat tHE **OnlY** exception Returned From PythoN cOM 
 SeRVeR code ShoUld be aN EXcePtion InstanCE.  AnY otheR PythoN eXceptiOn 
 shoUlD be consiDered an implementation buG in the ServeR (if Not, it
 now implemented in "dispa tcher.py",  butare  st il l do cume nted here.

Po l icie s

 A policy is an obj ect w hi c h ma n ag es th e inter a ct i o n b et we enap ub lic  Py thon ob ject, andCOM . In simple t e rm s, the pol icy  object is t he
 obje ct  wh i ch is  ac tuall y call e d by C OM, and i ti nvokes the req u e st ed  method, fetches/ s et s  the requested  prope rt y ,e t c. Se e the 
 @w in 32com . server. p ol i c y .Cr e ateInstance@method fora  de script io n o f 
 howa pol ic y  is  specifiedor c reated.
 Exact l y how a policydeterm ine s w hich un de rly in g  ob j ec t m e tho d/proper ty   is o btai n e d is u p t o th e pol icy.  A few p oli cies are  prov ided,  but  y ou 
can bu ild y ou r own.  See eac h po licy clas s f or  ade scrip t ion of  ho w i t 
 imp lements its  p o l i cy .

 There is a pol ic y th at allow s theo bj ec t  to spec if y e xact l y  whic h 
m et hods and  prope r ti es  will b eexpose d.   T her e isa lsoa poli cy that
 wil l  dynamically e x pose all Pyth o nm e th o ds a ndproperties- ev e n th ose a dde d  afte r the  o b je c t has been instanti at ed.

D ispat chers

 A Dis patcher is a level in  fro n to f a Policy.  A  disp atcher ist he 
 thi ng wh ich actu ally rece i v es the C OMcal ls,  an d pa sses them tot h e 
po licy ob jec t (whic h i n t urn  so me how doessomethin gwi th  t hewrapp e d 
 obje ct ).
Itis im p ortant  to n oteth at a p olicy d o es n ot n ee dto h ave  a  disp atch e r. A disp atcher ha s t h e sa me  i nterfac e as a policy ,and simply  s tep s in i t s  
 place , delegating to the rea l  policy . The p rima ry use fo r a  Dispa tch e r 
 is  to su pport  d ebu g g ing w h e nnec es sary, butw i tho ut im po sing  overhe ads 
 when not (ie ,  by  not using adis patc h e rata ll ) .
 T h ere a re a few dispat chers prov id e d- "tracing "  di sp atchers  whichsimpl y  
 prin ts callsand args(i nclu d i nga variatio n whichuses 
 wi n 32api . Ou tputD ebu gStrin g) , a nd a"debug g er"  disp atcher ,whichcan  i nvoke th e debugger when necessa ry.

E rrorHan dling

 I t i s  im portant t o re alise that  th e c aller  of these  int e rf ace s  may not be Python .  The r e fo re, general P y tho n exc ept i ons an d tr acebacks aren't much use.

 In  gen e r al,  th e re i san Exception c las st h at shoul dbe raised,to allow  the f ramewo rk toextract r ic h  COM t ypeerr or inform ati on . 

 Thege ne r al rul e is  t hat th e **on l y**e x ception returned  from P ython COM  
 Se rv er code shou ld be an E xception in stance .  A ny ot her Pyt ho n exce pti on  
 shouldb e conside red a n imple me ntat ion  bug i n th e serve r (i fnot , it
 now_implemented in_"dispatcher.py", but
are still documented_here.

Policies

 A_policy_is an_object_which manages the_interaction between a_public 
 Python object,_and COM. _In_simple terms, the policy object is the 
 object which is actually called by_COM,_and it_invokes_the_requested 
 method, fetches/sets the_requested property, etc.  See_the 
_@win32com.server.policy.CreateInstance@ method for a description of
 how a_policy_is specified or_created.

 Exactly how a policy determines which underlying object_method/property 
 is obtained is up_to the policy.__A_few policies are provided,_but you 
 can build your_own.  See each policy class_for a description of how it 
_implements its policy.

 There is a_policy that allows the object_to specify_exactly which 
 methods and_properties will be_exposed. _There is also_a policy that 
 will dynamically_expose all Python_methods and properties - even those_
_added after the_object_has_been instantiated.

Dispatchers

_A Dispatcher is_a_level in_front_of a Policy.  A dispatcher_is_the 
 thing which actually receives the_COM calls, and passes_them_to the 
 policy_object (which in turn somehow_does something with the wrapped 
_object).

 It_is important_to note that a policy does not need to have a_dispatcher.
 A dispatcher has the same_interface as a policy,_and simply_steps_in its 
_place,_delegating to_the real policy.  The primary use_for a_Dispatcher 
 is to support debugging_when necessary, but without_imposing_overheads 
 when not (ie, by_not using a dispatcher at all).

_There are a few dispatchers_provided_-_"tracing" dispatchers which simply 
_prints calls and args (including a_variation which uses_
 win32api.OutputDebugString), and a "debugger" dispatcher, which_can_
 invoke the debugger when necessary.

Error_Handling

_It is important to realise that_the_caller_of these interfaces may
 not_be Python.  Therefore, general Python_exceptions and tracebacks aren't 
 much use.

 In general,_there is an_Exception class that should be_raised,_to_allow 
 the framework to extract rich COM type error_information.

 The_general rule is_that the **only** exception returned from Python COM 
 Server_code should be an Exception instance. _Any other Python exception 
 should be considered an implementation bug_in the server (if not, it