Grant:<br>
<br>
( I read your new source code before commenting ...  NICE PROJECT !  &lt;insert back patting here&gt; )<br>
<br>
The constants you are using here are hard-coded into adodbapi, therefore adodbapi.adTinyInt <br>
has the same value as adTinyInt in your dbe_globals.py<br>
and win32com.client.constants.adTinyInt<br>
<br>
I assume that those values are not likely to change -- since they end
up in a lot of static compiled code -- and a few extra hard-coded
definitions of them laying around in Python source modules should not
be a source of difficulty. IMHO your recent solution is correct.<br>
<br>My goal is to get adodbapi to the point where it can be pretty much a drop-in replacement for pgdb and MySQLdb in most cases, so that programmers can use it to start moving code like yours into newer and/or weirder environments (i.e. IronPython and Python 3). I will be referring to your work as I add postgresql tests to the adodbapi suite.<br>

--<br>
Vernon Cole<br>
<br><br><div class="gmail_quote">On Thu, Aug 27, 2009 at 5:51 AM, Grant Paton-Simpson <span dir="ltr">&lt;<a href="mailto:grant@p-s.co.nz">grant@p-s.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Harald,<br>
<br>
I managed to make a file containing everything I needed.  NB the command<br>
is makepy.py not makepy.  There was, however, an issue with genpy.py<br>
asserting there had to be a self.file.encoding even though I couldn&#39;t<br>
see where that was set.  I temporarily commented that assert out.  File<br>
creation then worked.  I then took out the small portion of the script I<br>
needed - all the data type constants - and put those in my own module. Success!<br>
<br>
For the benefit of others, the reason you don&#39;t have to specify the<br>
library e.g. ActiveX 2.8, is that you will be prompted for it via a pop<br>
up GUI.<br>
<br>
<br>
All the best, Grant<br>
<br>
<br>
Massa, Harald Armin wrote:<br>
&gt; Grant,<br>
&gt;<br>
&gt; that is possible. Just read the makepy.py script within<br>
&gt; win32com.client, and you will find that someway down main() there is<br>
&gt;<br>
&gt; ---------<br>
&gt; GenerateFromTypeLibSpec(arg, f, verboseLevel = verboseLevel,<br>
&gt; bForDemand = bForDemand, bBuildHidden = hiddenSpec)<br>
&gt; ---------<br>
&gt;<br>
&gt; which does this.<br>
&gt;<br>
&gt; BUT, for &quot;static&quot; usage of makepy-COM-Mappings I suggest to make<br>
&gt; makepy output it&#39;s results in a named file<br>
&gt;<br>
&gt; makepy -o ADO28.py<br>
&gt;<br>
&gt; and furtheron import that ADO28 file to access the variables. That<br>
&gt; does also work  with Excel and Word, and I am used to<br>
&gt;<br>
&gt; import ExcelXX as Excel<br>
&gt; ec=Excel.constants<br>
&gt;<br>
&gt; and further on us ec.* for excel constants.<br>
&gt;<br>
&gt; Best wishes,<br>
&gt;<br>
&gt; HArald<div><div></div><div class="h5"><br>
&gt;<br>
&gt; On Thu, Aug 27, 2009 at 2:51 AM, Grant Paton-Simpson &lt;<a href="mailto:grant@p-s.co.nz" target="_blank">grant@p-s.co.nz</a><br>
&gt; &lt;mailto:<a href="mailto:grant@p-s.co.nz" target="_blank">grant@p-s.co.nz</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi,<br>
&gt;<br>
&gt;     Basically I want to have an installation package automatically run the<br>
&gt;     COM MakePy utility for the ADO 2.8 library. I believe I need to do<br>
&gt;     this<br>
&gt;     so that constants like win32com.client.constants.adTinyInt will be<br>
&gt;     available when my application (<a href="http://www.sofastatistics.com" target="_blank">http://www.sofastatistics.com</a>)<br>
&gt;     connects to<br>
&gt;     MS Access and MS SQL Server databases.<br>
&gt;<br>
&gt;     Ideally I would have a line doing something like this:<br>
&gt;<br>
&gt;     win32com.runmakepy(&quot;Microsoft ActiveX Data Objects 2.8 Library (2.8)&quot;)<br>
&gt;<br>
&gt;     Is it possible to do this programmatically?<br>
&gt;<br>
&gt;<br>
&gt;     All the best, Grant<br>
&gt;     _______________________________________________<br>
&gt;     python-win32 mailing list<br></div></div>
&gt;     <a href="mailto:python-win32@python.org" target="_blank">python-win32@python.org</a> &lt;mailto:<a href="mailto:python-win32@python.org" target="_blank">python-win32@python.org</a>&gt;<div class="im"><br>
&gt;     <a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/mailman/listinfo/python-win32</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br></div>
&gt; --<br>
&gt; GHUM Harald Massa<br>
&gt; persuadere et programmare<br>
&gt; Harald Armin Massa<br>
&gt; Spielberger Straße 49<br>
&gt; 70435 Stuttgart<br>
&gt; 0173/9409607<br>
&gt; no fx, no carrier pigeon<br>
&gt; -<br>
&gt; LASIK good, steroids bad?<div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
python-win32 mailing list<br>
<a href="mailto:python-win32@python.org" target="_blank">python-win32@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/mailman/listinfo/python-win32</a><br>
</div></div></blockquote></div><br>