[python-win32] Why Win32_ prefixed classed in wmi didn't work?

2008-01-24 Thread thunder thunder54007
Hello, here is the problem. code like this in pythonwin: >>> import wmi >>> c = wmi.WMI() >>> print c.Win32_NetWorkAdapter.AdapterTypeID None >>> print c.Win32_NetWorkAdapter.Availability None >>> print c.Win32_NetWorkAdapter.Caption None >>> print c.Win32_NetWorkAdapter.AdapterType None this sa

Re: [python-win32] Why Win32_ prefixed classed in wmi didn't work?

2008-01-24 Thread Tim Golden
thunder thunder54007 wrote: > Hello, here is the problem. > code like this in pythonwin: > import wmi c = wmi.WMI() print c.Win32_NetWorkAdapter.AdapterTypeID > None print c.Win32_NetWorkAdapter.Availability > None print c.Win32_NetWorkAdapter.Caption > None print c.W

[python-win32] How to access the Outlook Express

2008-01-24 Thread Antony Joseph
Hi, I can access and read mails from Ms Outlook --- outlook = win32com.client.Dispatch("Outlook.Application") ... can any one tell me , How can access and read mails from Outlook Express --- outlook Express=win32com.client.Dispatch(.

Re: [python-win32] How to access the Outlook Express

2008-01-24 Thread Tim Golden
Antony Joseph wrote: > Hi, > > I can access and read mails from Ms Outlook >--- outlook = win32com.client.Dispatch("Outlook.Application") >... > can any one tell me , How can access and read mails from Outlook Express > --- outlook Exp

Re: [python-win32] How to access the Outlook Express

2008-01-24 Thread Michel Claveau
Hi! > I don't believe that Outlook Express exposes an IDispatch interface. I > think that you have to manipulate the mailbox directly. (Search for "DBX") +1 (or, I confirm) But, if Outlook-Express is the default messagerie software, there are few possibilities, by use MAPI interface (I believ

Re: [python-win32] Why Win32_ prefixed classed in wmi didn't work?

2008-01-24 Thread Tim Golden
thunder thunder54007 wrote: > I got it, I should get an instance first before i can use it, and here is > another problem, when I use Win32_Product to fetch the installed software on > my system, but only some of them are returned, I don't know why? how can i > get all the installed software on my

[python-win32] winshell error

2008-01-24 Thread Mike Driscoll
Hi, I have a Python login script that runs various things on login for the users in our Windows domain. Every once in a while, I'll get a traceback when I use winshell to try to find the user's desktop. The offending code is: userDesktop = winshell.desktop() And the traceback: File "\\servernam

Re: [python-win32] winshell error

2008-01-24 Thread Tim Golden
Mike Driscoll wrote: > I have a Python login script that runs various things on login for the > users in our Windows domain. Every once in a while, I'll get a traceback > when I use winshell to try to find the user's desktop. The offending code > is: > > userDesktop = winshell.desktop() > > And t

[python-win32] Changing a drive letter

2008-01-24 Thread Mike Driscoll
Hi, In a login script I helped write, we have some code that maps drives based on what department or group the user belongs to. One of our groups has users that use USB devices that will occasionally be plugged in before they log in. This causes the map drive part of the script to fail at mapping

Re: [python-win32] How to access the Outlook Express

2008-01-24 Thread Tim Roberts
Michel Claveau wrote: > >> I don't believe that Outlook Express exposes an IDispatch interface. I >> think that you have to manipulate the mailbox directly. (Search for "DBX") >> > > +1 (or, I confirm) > > But, if Outlook-Express is the default messagerie software, there are few > possib

Re: [python-win32] winshell error

2008-01-24 Thread Tim Roberts
Mike Driscoll wrote: > I have a Python login script that runs various things on login for the > users in our Windows domain. Every once in a while, I'll get a traceback > when I use winshell to try to find the user's desktop. The offending code > is: > > userDesktop = winshell.desktop() > > And the

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Alexander Belyaev
I am new to python and so far could not figure out what 'tp' means in the following? Thanks, Alexander tp,val = win32pdh.GetFormattedCounterValue( hc, win32pdh.PDH_FMT_LONG ) print hex(tp),val -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAI

Re: [python-win32] Changing a drive letter

2008-01-24 Thread Tim Roberts
Mike Driscoll wrote: > ... > If the map drives script doesn't get the drives mapped correctly, then we > usually get calls because the user cannot get to their network share. I > came up with a hack that uses a diskpart script to re-map the errant USB > drive to another letter and then map the corr

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Tim Roberts
Alexander Belyaev wrote: > I am new to python and so far could not figure out what 'tp' means in > the following? > > Thanks, > Alexander > > tp,val = win32pdh.GetFormattedCounterValue( hc, > win32pdh.PDH_FMT_LONG ) > print hex(tp),val > The PdhGetFormattedCounterValue API has two o

Re: [python-win32] Changing a drive letter

2008-01-24 Thread Paul Koning
> "Tim" == Tim Roberts <[EMAIL PROTECTED]> writes: >> ...And here's the diskpart line: >> >> subprocess.call(r'diskpart /s \\%s\someFolder\change_g.txt' % >> pdcName) Tim> In my own personal opinion, there's absolutely nothing wrong Tim> with this. That's what the tool is there for, a

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Paul Koning
> "Alexander" == Alexander Belyaev <[EMAIL PROTECTED]> writes: Alexander> I am new to python and so far could not figure out what Alexander> 'tp' means in the following? >>tp,val = win32pdh.GetFormattedCounterValue( hc, win32pdh.PDH_FMT_LONG ) >>print hex(tp),val I don't know tha

Re: [python-win32] python-win32 Digest, Vol 58, Issue 40

2008-01-24 Thread Mike Driscoll
Hi, > thunder thunder54007 wrote: > > I got it, I should get an instance first before i can use > it, and here is > > another problem, when I use Win32_Product to fetch the > installed software on > > my system, but only some of them are returned, I don't know > why? how can i > > get all the inst

Re: [python-win32] winshell error

2008-01-24 Thread Mike Driscoll
Hi Tim, > Message: 6 > Date: Thu, 24 Jan 2008 16:23:47 + > From: Tim Golden <[EMAIL PROTECTED]> > Subject: Re: [python-win32] winshell error > Cc: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Mike Driscoll wrote: >

[python-win32] Why Win32_ prefixed classed in wmi didn't work?

2008-01-24 Thread Mike Driscoll
Sorry...forgot to change the Subject line on that last one. This is a repost > thunder thunder54007 wrote: > > I got it, I should get an instance first before i can use > it, and here is > > another problem, when I use Win32_Product to fetch the > installed software on > > my system, but only some

Re: [python-win32] winshell error

2008-01-24 Thread Mike Driscoll
> -- > > Message: 9 > Date: Thu, 24 Jan 2008 10:40:27 -0800 > From: Tim Roberts <[EMAIL PROTECTED]> > Subject: Re: [python-win32] winshell error > To: Python-Win32 List > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >

Re: [python-win32] Changing a drive letter

2008-01-24 Thread Mike Driscoll
Tim & Paul, > > Message: 3 > Date: Thu, 24 Jan 2008 14:31:07 -0500 > From: Paul Koning <[EMAIL PROTECTED]> > Subject: Re: [python-win32] Changing a drive letter > To: [EMAIL PROTECTED] > Cc: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=us-ascii >

Re: [python-win32] Changing a drive letter

2008-01-24 Thread Tim Golden
Paul Koning wrote: > I agree. If you do want to use an API rather than a subprocess, WMI > might serve. The biggest drawback of WMI is that the documentation is > partly nonexistent and, when it does exist, is of very low quality. > > On the other hand, the Python WMI module is quite nice. Why,

Re: [python-win32] How to access the Outlook Express

2008-01-24 Thread Alec Bennett
What do you need to do to it? If you're simply remote controlling it (triggering commands), you might look into PostMessage. --- Tim Roberts <[EMAIL PROTECTED]> wrote: > Michel Claveau wrote: > > > >> I don't believe that Outlook Express exposes an > IDispatch interface. I > >> think that

[python-win32] Exposing a Java bean in Python

2008-01-24 Thread Gary Scorby
I have a Java bean and I don't know what to do with it. Has anyone exposed a Java bean in Python? I'm sending the questions to this group because win-32 does what I need for com objects. Similar goal so I'm hoping someone else has had this need for a Java bean. Any help would be appreciated.

[python-win32] Re: Changing a drive letter

2008-01-24 Thread Roger Upole
Mike Driscoll wrote: > Hi, > > In a login script I helped write, we have some code that maps drives based > on what department or group the user belongs to. One of our groups has > users that use USB devices that will occasionally be plugged in before > they log in. This causes the map drive part o

Re: [python-win32] How to access the Outlook Express

2008-01-24 Thread Michel Claveau
Hi! > What do you need to do to it? If you're simply remote controlling it > (triggering commands), you might look into PostMessage. It's Antony Joseph who needs something (he sent the first message). if not, with MAPI, we can (also) obtain the list of the messages received in the past, to remo