[python-win32] win32security.LogonUser

2008-07-24 Thread _ _
Hi... How are you? I use win32extensions... I have a problem, can you help me please? import win32security domain = "myNetworkDomain" username = "testUser" password = "testUser" hUser = win32security.LogonUser (username, domain, password, win32security.LOGON32_LOGON_NETWORK,win32security.LOGON3

Re: [python-win32] win32security.LogonUser

2008-07-24 Thread Tim Golden
_ _ wrote: Hi... How are you? I use win32extensions... I have a problem, can you help me please? import win32security domain = "myNetworkDomain" username = "testUser" password = "testUser" hUser = win32security.LogonUser (username, domain, password, win32security.LOGON32_LOGON_ NETWORK,win32s

Re: [python-win32] win32security.LogonUser

2008-07-24 Thread _ _
1) D: is a local drive 2) "testUser" actually have security access. If I execute Notepad as "testUser", I can create this file in this folder. 3) I check that the folder exists. Thanks a lot 2008/7/24 Tim Golden <[EMAIL PROTECTED]>: > _ _ wrote: > >> Hi... How are you? >> >> I use win32extensio

Re: [python-win32] win32security.LogonUser

2008-07-24 Thread Tim Golden
_ _ wrote: 1) D: is a local drive 2) "testUser" actually have security access. If I execute Notepad as "testUser", I can create this file in this folder. 3) I check that the folder exists. Well, can you do some other tests such as: + Use os.access or os.exists to determine whether the new us

Re: [python-win32] ctypes and DLL

2008-07-24 Thread Thomas Heller
Marcus.CM schrieb: > Hi > > On Windows/Vista :- > > vr = ctypes.CDLL(str) > > When loading a DLL that is corrupted using cytpes, i get a bombed out > box with "python.exe - bad image" as the message box title instead of > handling it at my exception handler. > How do i do this without th

Re: [python-win32] win32security.LogonUser

2008-07-24 Thread _ _
+ I use os.path.isfile ("D:/test/local/file.txt") and return False. And "D:/test/local/file.txt" exists! + If I try to read a file return a error... + The user can't read or write files when I impersonated. But if I login interactive, or execute as, with this user ("testUser") I can read and write

Re: [python-win32] win32security.LogonUser

2008-07-24 Thread Tim Golden
_ _ wrote: + I use os.path.isfile ("D:/test/local/file.txt") and return False. And "D:/test/local/file.txt" exists! + If I try to read a file return a error... + The user can't read or write files when I impersonated. But if I login interactive, or execute as, with this user ("testUser") I can

Re: [python-win32] how to automate VB fron python

2008-07-24 Thread jose simas
Hi, Your best bet would be writing an Add-In for VB6's IDE. Check out: http://oreilly.com/catalog/devvbad/chapter/ch01.html For an intro to VB Add-ins and use SpamBayes as a model for your python code: http://spambayes.sourceforge.net/ Hope this helps Jose _

Re: [python-win32] Python and Visual Basic Integration

2008-07-24 Thread Mike Driscoll
Mark Norley wrote: Thanks for the advice everyone. I've managed to get my VB GUI talking to a simple "Hello World!" Python COM server (there was a quickstart help page in the pywin32 package that I hadn't spotted). As I understand it, you can call VB stuff from within IronPython and vise-ve

Re: [python-win32] How to replace the values with keys ?

2008-07-24 Thread Tim Roberts
Graps Graps wrote: aDict is a dictionary, containing {0: 'str1\n', 1: 'str22\n', 2: 'str3\n', 3: 'str4\n', 4: 'str5\n', ..., , 1308: 'str1309\n'}. Are you saying that string is exactly what is in the file "aDict.py"? In that case, you can't import it. The expression will be evalua

Re: [python-win32] ctypes and DLL

2008-07-24 Thread Marcus.CM
Hi Thomas, Thanks, will give it a shot . My main concern is that i need to use the code in a service and have a display msgbox is not an ideal design. Marcus Thomas Heller wrote: Marcus.CM schrieb: Hi On Windows/Vista :- vr = ctypes.CDLL(str) When loading a DLL that is corrupted

Re: [python-win32] Problem with TLB file and COM

2008-07-24 Thread Reedick, Andrew
> -Original Message- > From: Mark Hammond [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2008 9:25 PM > To: Reedick, Andrew; [email protected] > Subject: RE: [python-win32] Problem with TLB file and COM > > > from win32com.client import gencache > mod = gencache.EnsureModul

[python-win32] Excel Document

2008-07-24 Thread Sina S
Hi guys, I have been using this module http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440661 To read the contents of an excel spreadsheet. In one case I am trying to read the value of the cell rather than its contents. i.e. if I have a hyperlink called "Document" or "Procedure" which is