import error for adoconstants

Mar 25 at 8:55 PM
Hello,
I don't seem to be able to get the constants for adodb working no matter what I try.
using the following two lines:
from win32com.client import Dispatch
from adoconstants import * 
I get an import error on the second line. If I try:
from win32com.client import constants
I don't get the constants I'm looking for like:
adVarChar and adParamInput.
And, as I hover the mouse pointer over win32com.client, it shows <unknown type>.
Under my python environments (2.7) it shows the pywin32 (217) package.
Should this work?

Steve
Mar 28 at 8:08 PM
Edited Mar 28 at 8:26 PM
Hi Zooba,
I got it. Thanks for not replying. It made me figure it out. I have to include the search paths in Visual Studio even though the search path is in the PYTHONPATH environment variable. I'm not used to having to do this so I get stumped when stuff doesn't work sometimes.

Steve
Coordinator
Mar 28 at 9:16 PM
Sorry, I kept getting distracted by other things.

The <unknown type> is expected, since there is no variable win32com or win32com.client created when you do a from...import (if you try and access it, you'll get a NameError).

We also have a change coming that will simplify the PYTHONPATH issue, but it would not have helped you diagnose this. I've also recently fixed some issues with win32com (this package has caused us a lot of headaches :) ) that may resolve the completions, though it doesn't look like constants will ever show completions because it doesn't actually have any members...

Glad you got it sorted out.