Re: [python-win32] ISensLogon COM Object

2008-01-10 Thread le dahut
First, thank you for your answer, you really remove me a spine of the foot. I have to use ISensLogon for this reason http://technet2.microsoft.com/WindowsVista/en/library/6ec4ec6d-6b84-44c9-b3af-116589a42b861033.mspx?mfr=true today I use Winlogon Notification package to catch Logon and Logoff ev

[python-win32] AttributeError: 'NoneType' object has no attribute 'PageSetup'

2008-01-10 Thread a_n_s_h_a_n
hi! newbie here. from the subject, there is an error in the code. could anyone please exlpain why? here's the code: import win32com.client filename = 'D:\\FR23\\tickets\\07120306-IEEEToCGenerator\\test.doc' wordapp = win32com.client.Dispatch("Word.Application") # Create new Word Object wo

Re: [python-win32] ISensLogon COM Object

2008-01-10 Thread Roger Upole
This works on XP and Vista. import win32com.client import win32com.server.policy import pythoncom ## from Sens.h SENSGUID_PUBLISHER = "{5fee1bd6-5b9b-11d1-8dd2-00aa004abd5e}" SENSGUID_SUBSCRIBER_LCE ="{d3938ab0-5b9d-11d1-8dd2-00aa004abd5e}" SENSGUID_SUBSCRIBER_WININET = "{d3938ab5-5b9d-11d1-8dd2-

Re: [python-win32] AttributeError: 'NoneType' object has no attribute 'PageSetup'

2008-01-10 Thread Tim Johnson
I can't test this right now, but just looking at the code it would appear that wordapp.Documents.Add() is returning None instead of a word document object. Take out the close and quit lines and run it with python -i or type it in interactively and then you can do a dir() on the worddoc object and

[python-win32] Python and Excel

2008-01-10 Thread Jd H
Hi there, I have the below python code that was working via Windows Task Scheduler on Windows 2000 Terminal Server: import os, commands from win32com.client import Dispatch myExcel.Workbooks.Add('C:/JD/billing/Billing-Report-' + str(today) + '.xls') myExcel.Workbooks.Add('C:/JD/billing/macro.XLA

Re: [python-win32] ISensLogon COM Object

2008-01-10 Thread Tim Roberts
le dahut wrote: > First, thank you for your answer, you really remove me a spine of the foot. > > I have to use ISensLogon for this reason > http://technet2.microsoft.com/WindowsVista/en/library/6ec4ec6d-6b84-44c9-b3af-116589a42b861033.mspx?mfr=true > today I use Winlogon Notification package to c

Re: [python-win32] ISensLogon COM Object

2008-01-10 Thread Tim Roberts
Roger Upole wrote: > This works on XP and Vista. > Well, this clearly proves that the COM path isn't as hard as I said it was! This is a great sample app that demonstrates several things very well. Is there a Wiki where we could put this for posterity? -- Tim Roberts, [EMAIL PROTECTED] Pro

Re: [python-win32] AttributeError: 'NoneType' object has no attribute 'PageSetup'

2008-01-10 Thread Tim Roberts
a_n_s_h_a_n wrote: > hi! newbie here. from the subject, there is an error in the code. > could anyone please exlpain why? here's the code: Your code works fine for me, at least through the Content stuff. You might try setting wordapp.Visible to 1 so you can see what is going on. For example,

[python-win32] replacing CreateProcess command for Vista compatibility?

2008-01-10 Thread Kirk Vander Meulen
Hi, I'm running the program Pymol (written in python) on Windows Vista, and in trying to run one of its plugins, I em encountering the following error: Error: 3 WindowsError Exception in Tk callback Function: at 0x027C6DF0> (type: ) Args: () Traceback (innermost last): File "C:\Program File

Re: [python-win32] replacing CreateProcess command for Vista compatibility?

2008-01-10 Thread Tim Roberts
Kirk Vander Meulen wrote: > Hi, I'm running the program Pymol (written in python) on Windows > Vista, and in trying to run one of its plugins, I em encountering the > following error: > ... > WindowsError: [Errno 193] %1 is not a valid Win32 application > > > Probably not all of that is relevant,

Re: [python-win32] ISensLogon COM Object

2008-01-10 Thread Roger Upole
Tim Roberts wrote: > Roger Upole wrote: >> This works on XP and Vista. >> > > Well, this clearly proves that the COM path isn't as hard as I said it > was! > > This is a great sample app that demonstrates several things very well. > Is there a Wiki where we could put this for posterity? > win32co