<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 2, 2013, at 1:12 PM, Vernon D. Cole <<a href="mailto:vernondcole@gmail.com">vernondcole@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div style="">So -- here is a prototype...</div><div style=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">>>> import adodbapi</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

>>> c = adodbapi.connect("provider=Microsoft.ACE.OLEDB.12.0;data source=../examples/test.mdb")</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

>>> c</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><adodbapi.adodbapi.Connection object at 0x0000000001ECDF60></blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">>>> c.dbapi</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<module 'adodbapi.apibase' from 'C:\Python27\lib\site-packages\adodbapi\apibase.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

pyc'></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">>>> c.dbapi.NUMBER</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><adodbapi.apibase.DBAPITypeObject object at 0x00000000025E8358></blockquote>

</blockquote><div><br></div><div style="">My implementation is:</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

import apibase as api </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">class Connection(object):</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">    # include connection attributes as class attributes required by api definition.</blockquote>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">    dbapi = property(lambda cls: api)</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

    Warning = api.Warning</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> ... (etc.)<br></blockquote>

<div> </div><div style="">Is that what we want to see?</div></div></blockquote><div><br></div><div>Python @property will pick up on the __doc__ of the method (which is also expected to be an instance method), so that can be specified traditionally:</div><div><br></div><div>class Connection(object):</div><div>    @property</div><div>    def dbapi(self):</div><div>        "Return a reference to the DBAPI module for this Connection."</div><div>        return api</div><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div dir="ltr"><div style="">--</div><div style="">Vernon Cole</div><div style=""><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 2, 2013 at 8:54 AM, M.-A. Lemburg <span dir="ltr"><<a href="mailto:mal@egenix.com" target="_blank">mal@egenix.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 02.05.2013 15:53, Michael Bayer wrote:<br>
>> Another readable candidate would be "connection.dbapi".<br>
><br>
> +1 for connection.dbapi<br>
<br>
</div>Sounds like we're reaching consensus :-)<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Marc-Andre Lemburg<br>
<a href="http://eGenix.com">eGenix.com</a><br>
<br>
Professional Python Services directly from the Source  (#1, May 02 2013)<br>
>>> Python Projects, Consulting and Support ...   <a href="http://www.egenix.com/" target="_blank">http://www.egenix.com/</a><br>
>>> mxODBC.Zope/Plone.Database.Adapter ...       <a href="http://zope.egenix.com/" target="_blank">http://zope.egenix.com/</a><br>
>>> mxODBC, mxDateTime, mxTextTools ...        <a href="http://python.egenix.com/" target="_blank">http://python.egenix.com/</a><br>
________________________________________________________________________<br>
2013-04-30: Released eGenix PyRun 1.2.0 ...       <a href="http://egenix.com/go44" target="_blank">http://egenix.com/go44</a><br>
<br>
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::<br>
<br>
   <a href="http://eGenix.com">eGenix.com</a> Software, Skills and Services GmbH  Pastor-Loeh-Str.48<br>
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg<br>
           Registered at Amtsgericht Duesseldorf: HRB 46611<br>
               <a href="http://www.egenix.com/company/contact/" target="_blank">http://www.egenix.com/company/contact/</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></body></html>