Python Forum

Full Version: python comobject
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello,

i am learning about comobject in python
but the internet seems not to have so many clear information about it
does somebody know a clear explanation or a tutorial about comobject?

my problem:
we are retrieving a buch of records from exchange
we seem to have data comming in
we use .restrict method
but when i do
print(len(comobject before restrict))
and
print(len(comobject after restrict))
i get twice the value 2147483647

my code

print(len(appointmentst))
...    begin = dt.date.today()
...    print(begin)
...    end = begin + dt.timedelta(
...        days=7);  
...    print(end)
...    restriction = "[Start] >= '" + begin.strftime("%m/%d/%Y") + ' 12:00 AM'"' AND [End] <= '" + end.strftime(
...        "%m/%d/%Y") + ' 12:00 AM'"'"
...    print(restriction)
...    restrictedItems1 = appointmentst.Restrict(restriction)
...    print(len(restrictedItems1))
anyhow, how do i know what is in this comobject?
because, the result of this is afterwards handeled by an for loop an this one never starts, so the comobject seems to be empty
what is comobject in the first place?
yeah, thats actualy also part of my question :p

what i know so far:
-it has something to do with VBA
-i get it when i try to retrieve data from outlook via win32com package


much more i do not understand myself from google searches