are win32com definitions from adovbs.inc accessible to Python or do I have to transcode them?
dsavitsk
dsavitsk at e-coli.net
Sun Jul 7 15:10:44 EDT 2002
I think this is what you are asking ... have you run MakePy and looked in
the generated code (in ..\gen-py)? they should be there, and they should be
accessable. the only caveat is that MakePy will need to be run wherever you
install. i prefer, however, even after running MakePy, to just add a
comment as to what they are in case makepy support disappears somewhere
(usually from upgrading python and forgetting to re-makepy).
>>> CMD.CommandType = 0x1 # adCmdText
>>> RS.CursorType = 3 # adOpenStatic
but you can get to them via ...
>>> win32com.client.constants.adCmdText
1
>>> win32com.client.constants.adOpenStatic
3
which sems like a lot of typing to me. (also, note that the "c" in constants
is lowercase.)
-d
"chris lyon" <chris.lyon at spritenote.co.uk> wrote in message
news:3d272a2b$0$4298$afc38c87 at news.easynet.co.uk...
> I'm using Python 2.1.2.12 with ADO and am wondering if anyone has a way of
> encoding the defined constants in adovbs.inc or do I have to look them up
> myself (error prone) or do I encode the package myself (noble but the
> deadline approaches) ?
>
> Sorry if this seems a bit cheeky, if theirs a more appropriate mailing
list
> for these question please point me at it.
>
> Chris Lyon
>
>
More information about the Python-list
mailing list