Re: [python-win32] Python Hooks Navigation Logger Windows

2010-06-23 Thread Tim Roberts
ant to use Python. EasyHook is just a DLL. It can be called from Python. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Python Hooks Navigation Logger Windows

2010-06-23 Thread Tim Roberts
er hand, if it's working in C#, I'm not sure why you would want to change it. Just extend the C# code to do what you need. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.

Re: [python-win32] Registering 64-bit Shell Extension using 32-bit Python

2010-06-22 Thread Tim Roberts
ermission field of RegOpenKeyEx to access the 64-bit hive from a 32-bit application. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Parse HTML String only not file

2010-06-17 Thread Tim Roberts
ge your ParserHTML class to create a list in "def __init__", then append the values that you get to the list instead of printing them. So, for example: class ParserHTML(SGMLParser): def __init__(self): SGMLParser.__init__(self) self.results = [] ... def handle_data(self, d

Re: [python-win32] Python Hooks Navigation Logger Windows

2010-06-15 Thread Tim Roberts
get done. Just starting up a relatively simple application can cause THOUSANDS of file and directory accesses, as it searches through its path for each and every DLL. If your system is busy, Python won't be able to keep up. Roger Dahlstrom wrote: >You could tail the log file... Another g

Re: [python-win32] Python Hooks Navigation Logger Windows

2010-06-15 Thread Tim Roberts
tem filter driver, just as I described. It also installs filter drivers in many other driver stacks. It's a fairly intrusive technology. Darn cool voodoo, but intrusive. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-

Re: [python-win32] SetPrinterDataEx or SetPrinterData

2010-06-14 Thread Tim Roberts
ok like PyWin32 wraps either > of these directly. Does anyone know any workarounds? Thanks! Those are just shortcuts to registry access. Have you tried manipulating the registry by hand to make sure you can effect the changes you want? -- Tim Ro

Re: [python-win32] Python Hooks Navigation Logger Windows

2010-06-14 Thread Tim Roberts
d be disastrous. That requires a kernel-mode file system filter driver, which is an enormously complicated beast that absolutely cannot be written in Python. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing

Re: [python-win32] Creating a list of stress tests for unit tests involving files

2010-06-09 Thread Tim Roberts
y ASCII characters (in part, because of the "r"). Were you trying to include some real Unicode outside of the ASCII subset? If so, then maybe something like this: UNITTEST_UNICODE_PATH = u"U\u00F1i\u00E7\u03B8de" That's "Uñiçθde", which is a valid Windows file n

Re: [python-win32] Help! How to get IHTMLDocument3 dispatch object?

2010-05-27 Thread Tim Roberts
Only the documents within IE do so. The MSDN articles talk about the Internet Explorer object model, which describes how to get from here to there. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Help! How to get IHTMLDocument3 dispatch object?

2010-05-27 Thread Tim Roberts
get_Document() That "doc" object should be an IHTMLDocument2. If you really need the "...3" version, that's where you do the QueryInterface. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Please help! How to get the event handler with IE Dom interfaces?

2010-05-27 Thread Tim Roberts
is associated with an element. The code below adds the "click" event on the fly, in a callback event that happens after the page has loaded. It's quite possible that you are querying the document before the "ready" callback has completed. You might try delaying for a b

Re: [python-win32] does pipes.quote() work properly on Windows?

2010-05-24 Thread Tim Roberts
uoting is necessary. If you intend to mash them together into a single string, then I'm afraid you will need to experiment. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] does pipes.quote() work properly on Windows?

2010-05-21 Thread Tim Roberts
d shell. The Windows APIs don't want the quotes. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Enable/disable Remote Desktop via Python

2010-05-17 Thread Tim Roberts
ourself, right? If so, you need to be careful how you do this. If you actually stop the service, then YOUR session will be closed as well, and you won't be able to get back in without going physically to the machine. -- Tim Roberts, t...@pr

Re: [python-win32] Enable/disable Remote Desktop via Python

2010-05-14 Thread Tim Roberts
l doesn't allow concurrent > multi-user logins in the year 2010. > Yes, but FWIW, this is an artificial licensing restriction, not a technical restriction. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win3

Re: [python-win32] Windows Error 126 - PyVisa related??

2010-05-12 Thread Tim Roberts
. How did you get a "new PC" with XP 64? XP 64 is a weird beast. Microsoft never actually built a 64-bit version of XP. What you have there is the Windows Server 2003 64-bit kernel, but they took a text editor to change the version name to "

Re: [python-win32] Setting UserInitials in Office

2010-05-03 Thread Tim Roberts
ngs (like utf16, > utf32, etc). It writes just fine, but if I open Microsoft Word and > check for the new initials or Full Name, Word just shows junk. This works: _winreg.SetValueEx( k, "UserInitials", 0, _winreg.REG_BINARY, u"timr\0" ) Note the trailing 0. -

Re: [python-win32] MFCC71.DLL Errors

2010-05-03 Thread Tim Roberts
> > When replying, please edit your Subject line so it is more specific > than "Re: Contents of python-win32 digest..." > -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-

Re: [python-win32] MFCC71.DLL Errors

2010-05-02 Thread Tim Roberts
one the board would know what the fix might be? If you are running the 32-bit Pythonwin, then you need to add the 32-bit MFC71.DLL to the \Windows\SysWow64 folder, not System32. Yes, 64-bit things go in System32, and 32-bit things go in SysWow64. Believe it or not. -- Tim Roberts,

Re: [python-win32] Setting UserInitials in Office

2010-04-27 Thread Tim Roberts
Tim Golden wrote: > On 26/04/2010 23:56, Tim Roberts wrote: >> Mike Driscoll wrote: >>> ... >>> HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\UserInfo >>> >>> I tried to use the base64 module to decode it, but I must be doing >>> some

Re: [python-win32] get installed software remote machine

2010-04-27 Thread Tim Roberts
her need to use the "r" prefix on that string, or double all the backslashes. Why are you using "import wmi" for this, if you're just doing straight registry parsing? You're asking for KEY_ALL_ACCESS, which is read and write permission.

Re: [python-win32] Using win32com.mapi to automate mail dispatch...

2010-04-27 Thread Tim Roberts
Varun Avashia wrote: > Yes Tim, the user has Admin privileges, And has this user already configured Outlook so that all of his mailboxes really exist? > and eid has a -ve value of -2147221233. > Duh, you did say that in the original message, didn't you... -- Tim Roberts,

Re: [python-win32] Setting UserInitials in Office

2010-04-26 Thread Tim Roberts
ing wrong. Does anyone know of a good way to get and set this > information? I am dealing with users on Windows XP and Python 2.4 ??? The strings in there are not encoded in any way. They are plaintext Unicode strings. They happen to be identified as REG_BINARY, but that's just a

Re: [python-win32] Using win32com.mapi to automate mail dispatch...

2010-04-26 Thread Tim Roberts
quot; that you fetched in the line immediately preceding. Perhaps something went wrong with fetching the outbox ID. Has Outlook 2007 actually been configured for Administrator on this machine? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Solid Example of Inputting Text into Win32 App?

2010-04-26 Thread Tim Roberts
en use SetWindowText or send a WM_SETTEXT message to change the text as displayed. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Using the COM interface of Infinion Memtool

2010-04-21 Thread Tim Roberts
rt window and pass > the COM-Port > and Speed Parameter within my script? There's no way to tell from the interface, and several minutes of Googling didn't turn up any documents that describe the object model. You're going to need to ask Infineon, or Keil, or an XC164 forum, or a

Re: [python-win32] win32com.client.dispatch

2010-04-21 Thread Tim Roberts
a "rich" object model with lots of methods and properties. The examples are mostly in Visual Basic or C#, but it's not too hard to translate them to Python. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ pyt

Re: [python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Tim Roberts
gt; a more comprehensible error. > This kind of thing is becoming less of an issue as time goes on, but it still pops up from time to time. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@pyt

Re: [python-win32] Accessing the Win32 GUI event system.

2010-04-13 Thread Tim Roberts
plays with win32evtlog, using "System" as my source which doesn't > contain that kind of UI information, as far as I can tell. No, the event log tracks things like security events, logins and logouts, service starts and stops, ap

Re: [python-win32] Using the COM interface of Infinion Memtool

2010-04-09 Thread Tim Roberts
ch("SMT.TargInfo.1") > >>> tf = win32com.client.Dispatch("SMT.TargIntf.1") > > But How can make a instance on the SMTFlashMod Class? I would be very disappointed in your pattern recognition and deductive skills if you have not already tried "SMT.FlashMod.1". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] zip of file using python

2010-04-08 Thread Tim Roberts
inrar lib or > equivalent lib for python. WinRar uses a proprietary compression scheme that does a little better in some cases, but cannot be read by standard tools like unzip. Seriously, it doesn't really matter, does it? -- Tim Roberts, t...@probo.com Providenz

Re: [python-win32] sending mail and "From" field

2010-04-01 Thread Tim Roberts
s whatever the default personality is in the Outlook session it hooks up to. You can't override it. It is, in part, an anti-spam measure. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] (no subject)

2010-03-31 Thread Tim Roberts
eadsheet open. If you really need this kind of shared access, Excel is the wrong application. You should use something like Access with a real database backend, where you can manage concurrent access more intelligently. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Pywin32+MFC Ok on 7 & Vista, bad on XP

2010-03-29 Thread Tim Roberts
When you change the graphics mode or select a brush or a pen, you are always supposed to put the original brush or pen back. > I can show my code, but it is >100 kB, too big for message. Not really, but if you want to send it to me in private email, that's fine. -- Tim Rober

Re: [python-win32] Pywin32+MFC Ok on 7 & Vista, bad on XP

2010-03-28 Thread Tim Roberts
wxPython? Tkinter? win32ui? Direct calls to the API? Show us your code, and we'll help you find the problem. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] help writing text to a windows edit control

2010-03-25 Thread Tim Roberts
App" ) t1 = win32gui.GetDlgItem( t, 1 ) print win32gui.SendMessage( t1, WM_SETTEXT, 0, "444") -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] administration script

2010-03-24 Thread Tim Roberts
You would do much better to search through those resources first. Here are two good examples: http://gallery.technet.microsoft.com/scriptcenter/en-us/ http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/Administrator/ActiveDirectoryRemoteAdminScripts.html -- Tim Rober

Re: [python-win32] help writing text to a windows edit control

2010-03-24 Thread Tim Roberts
access = os.access chdir = os.chdir chmod = os.chmod ... and so on, until every name from "os" is copied into your module. You EITHER do import os OR you do from os import * and the latter is virtually always a bad idea, because it fills your namespace with all t

Re: [python-win32] Help calling a windows function in user32

2010-03-23 Thread Tim Roberts
gui t = win32gui.FindWindow( None, "Windows App" ) win32gui.SetDlgItemInt( t, 1, 37 ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] (no subject)

2010-03-23 Thread Tim Roberts
David Hutto wrote: > On Tue, Mar 23, 2010 at 6:11 PM, Tim Roberts wrote: > >> Phung Thuy Vuong wrote: >> >>> Can anyone give me some hint please? I'm trying to make a log file >>> which keep track of a specific application. For example, I ne

Re: [python-win32] (no subject)

2010-03-23 Thread Tim Roberts
ports statistics back to some Python server "mother ship". There are several web articles on writing window hooks. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Help calling a windows function in user32

2010-03-23 Thread Tim Roberts
ItemText along with the control ID (1). The reason is fails is that FindWindow only returns top-level windows, not child windows. It IS possible to use FindWindowEx to search child windows, but you don't want that. What you NEED is the top-level dialog (which you have) and the control ID (which

Re: [python-win32] Help calling a windows function in user32

2010-03-23 Thread Tim Roberts
tDlgItemTextA(need to put the hwnd handle here i think??? not sure >how this is done, 1, "some text") // this is a user32 function that sends text >to my inputbox. Yes, you need to find the window handle of your dialog. You can use the FindWindow API to do that. -- Tim Roberts

Re: [python-win32] Win API call to display a BMP/PNG file as a splash screen for a console app?

2010-03-22 Thread Tim Roberts
ry for win32gui_demo.py and see where that gets you. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Win API call to display a BMP/PNG file as a splash screen for a console app?

2010-03-22 Thread Tim Roberts
message dispatch loop and window procedure, just like a full GUI application. There's really no other way. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Pywin32-Excel Range/Cells problems

2010-03-16 Thread Tim Roberts
Sylvain Fauveau (apli-agipa) wrote: > Tim Roberts a écrit : >> For what it's worth, it works up through 911 characters and fails on >> 912. That's odd. I wonder if this is a request-length restriction in >> the marshalling code. >> > So you can reprod

Re: [python-win32] Pywin32-Excel Range/Cells problems

2010-03-15 Thread Tim Roberts
's worth, it works up through 911 characters and fails on 912. That's odd. I wonder if this is a request-length restriction in the marshalling code. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] MIDL & MakePy

2010-03-04 Thread Tim Roberts
AY is not one of those. It cannot be handled safely in all languages. VT_ARRAY designates that the parameter is a pointer to a SAFEARRAY structure. > Is there some doccumentation somewhere to tell me which VARIANT types > I can use and how to do arrays? You said you couldn't chan

Re: [python-win32] Detect when application is running in a VM environment?

2010-03-03 Thread Tim Roberts
pyt...@bdurham.com wrote: > Looking for ideas on how to detect when our Windows application is > running in one of the following VM environments. Why? Is this for curiousity, or is it a lame-brained security scheme? -- Tim Roberts, t...@probo.com Providenza & Boekel

Re: [python-win32] Byte arrays and COM

2010-03-03 Thread Tim Roberts
low that spec, so you need to take extraordinary steps. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Pyvisa_GPIB problem

2010-03-02 Thread Tim Roberts
ot;, line 348, in __init__ > self._handle = _dlopen(self._name, mode) > WindowsError: [Error 126] Das angegebene Modul wurde nicht gefunden Error 126 indicates that a DLL was not found. If their DLL links to the Python26.dll runtime, that would cau

Re: [python-win32] Byte arrays and COM

2010-03-02 Thread Tim Roberts
a) The C++ routine gets an address that doesn't map to the > input string > and b) the returned value is (3, 84) Was that the exact code? 84 is correct, because your C code changes the first byte "T", which is ASCII 84. I would have expected the first parameter to be 6, however. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Catch system level events in python

2010-02-28 Thread Tim Roberts
can be done in C# can be done in Python. Do you have a C# example you want to copy? >http://mail.python.org/pipermail/python-win32/2008-January/006645.html Is this code not sufficient for your needs? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Concurrent Access to COM object from Python and VB6

2010-02-26 Thread Tim Roberts
t you have a solution. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] knowing "file accessed" and "file opened"

2010-02-26 Thread Tim Roberts
azuko can catch on linux > what can work on windows to see the file open and file access event ? > There is simply no mechanism in Windows to provide this information. It requires either API hooking or a file system filter driver, both of which are well beyond the scope of this mailing

Re: [python-win32] Dereferencing lParam pointer

2010-02-24 Thread Tim Roberts
ddress to me, Yes, that's 0x12DC44, which is in the heap. > but I am not sure. Is there a way to get the array/list? You will have to use a package like ctypes to do that. Something like this: lst = ctypes.cast(lParam, ctypes.POINTER(ctypes.c_int)) print lst[0] print lst[1] -- Tim R

Re: [python-win32] wmi error

2010-02-24 Thread Tim Roberts
n my script line 235 is > > c= wmi.WMI(computer=self.ip, user=self.adm, password=self.admmdp) What did you pass for self.ip? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] GetDIBits Troubles

2010-02-22 Thread Tim Roberts
ng as you're running true color (which everyone is today), it's the same end result. Alternatively, you can call GetObject on the hbm, which returns a BITMAP structure. The bmBits member contains a pointer to the bits (which you'd still have to copy). -- Tim Roberts, t...@prob

Re: [python-win32] win32gui and SysListView32

2010-02-18 Thread Tim Roberts
ttings. The leftmost column is ALWAYS left-justified. This cannot be changed. This seems like the hard way to write an application. Have you considered using a GUI framework like Tkinter or Qt or (my favorite) wxPython? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Python Automation Question

2010-02-17 Thread Tim Roberts
script change the default printer. Users do not expect that. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] passing c structure into python function

2010-02-15 Thread Tim Roberts
alls to Python. If you need to do this a lot, it might be worthwhile to learn about it. It is a difficult tool to learn, but once you get it, it's incredibly handy. Much of PyWin32 is automatically generated by swig (with careful tweaking). http

Re: [python-win32] permissions error

2010-02-12 Thread Tim Roberts
ograms. The win32com-generated wrappers need to go somewhere else, like "Local Settings\Temp" or "Local Settings\Apps". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] USB Insertion Extrinsic Event exists?

2010-02-11 Thread Tim Roberts
can ask to be notified via a WM_DEVICECHANGE message any time there is any change in state of any plug-and-play device. You would still have to do polling to find out whether the change was something you care about, but it would reduce the periodic polling. -- Tim Roberts, t...@probo

Re: [python-win32] Concurrent Access to COM object from Python and VB6

2010-02-05 Thread Tim Roberts
ting the object to see if that's enough to let the other apps run: del beWise However, since you have other object instances hanging around (the varInt and varString), I'm dubious that it will make much difference. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.

Re: [python-win32] How to check a Checkbutton

2010-02-04 Thread Tim Roberts
find any help. > How did you get the handle? At the lowest level, you get the current state by sending a BM_GETCHECK message to the window, and you set the state by sending a BM_SETCHECK message. MSDN describes the parameters you need to send. If you're doing raw API calls, you can us

Re: [python-win32] Documentation for win32com for Worksheets Worksheets.Range and Worksheets.Cells

2010-01-29 Thread Tim Roberts
"from __future__" statements, most Python 3 code will run in Python 2.6 (or later). -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Documentation for win32com for Worksheets Worksheets.Range and Worksheets.Cells

2010-01-29 Thread Tim Roberts
owever, you don't have to downgrade. Python 2 and Python 3 are able to coexist on a single computer without any problems. Just install them both. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-w

Re: [python-win32] Documentation for win32com for Worksheets Worksheets.Range and Worksheets.Cells

2010-01-28 Thread Tim Roberts
on") xl.Visible = 1 w = xl.Application.ActiveWindow w.Split = 1 I'm not entirely sure how to set the size of the individual panes. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Maybe the wrong newsgroup to ask ?

2010-01-27 Thread Tim Roberts
n, > (btw why are there children ?) There are child processes because you are setting "shell" to true. Thus, subprocess actually launches cmd.exe, and cmd.exe launches Python. Is there a reason you need a subshell, or was that superstition? -- Tim Roberts, t...@pro

Re: [python-win32] Maybe the wrong newsgroup to ask ?

2010-01-27 Thread Tim Roberts
process might already be closed by the user > pass There shouldn't be any difference. If you look at the code in subprocess. it calls the same API. The handle returned from CreateProcess has all access rights, including PROCESS_TERMINATE. Can you show us your original code

Re: [python-win32] WMI troubles!

2010-01-25 Thread Tim Roberts
user32.DispatchMessageW of course). That depends on the messages you're handling. For some messages, WPARAM and LPARAM point to structures that contain strings. For those, you need to know the character type. If there are no strings, then it doesn't matter which one you choose. --

Re: [python-win32] Problem accessing GetFontData in Windows API

2010-01-25 Thread Tim Roberts
where the PostScript name must be ASCII and usually has no spaces. I'm not sure I have an answer for this problem. In the worst case, I suppose you could do like GIMP does, and scan through %SystemRoot%\Fonts on your own. You could cache the information so you only checked files that h

Re: [python-win32] Problem accessing GetFontData in Windows API

2010-01-22 Thread Tim Roberts
ought HKEY_LOCAL_MACHINE was readable but not writable. > 3) its a kludge and bound to be inaccurate on some systems. > Not really -- this is the same database used by the system's font manager. That data is not simply decorative. It's no more kludgy than using OUTLINETEXTME

Re: [python-win32] Problem accessing GetFontData in Windows API

2010-01-22 Thread Tim Roberts
es in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts. That maps each font name to its corresponding file name. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] letter and number key codes for win32con

2010-01-15 Thread Tim Roberts
rdinary integer 49. You should be able to use either ord('1') or 49. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] WMI troubles!

2010-01-15 Thread Tim Roberts
writing a full-blown web application. It's a lot quicker to get a CGI script up and running. Yes, there is a short delay when starting a Python app, but after the interpreter has been loaded once, it should stay in the file cache, so subsequent loads go faster. -- Tim

Re: [python-win32] WMI troubles!

2010-01-15 Thread Tim Roberts
e and every mouse motion. > Finally, when you say "calling pythoncom.CoInitialize() in every > callback", what do you mean by 'callback'? Your OnKeyDown and OnKeyUp functions are being called in response to external events. You pass those functions to pyHooks, and it "

Re: [python-win32] WMI troubles!

2010-01-15 Thread Tim Roberts
rt of the "unxutils" collection on SourceForge. Anything piped into gclip is copied to the clipboard, and pclip prints the clipboard to its standard output. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32

Re: [python-win32] WMI troubles!

2010-01-15 Thread Tim Roberts
t to avoid what seems to be passing the keystroke to > the active app before my script can get it? I tried returning False in > my keyUp function but that made no difference. This shouldn't be an issue. The hotkeys are handled by Explorer, which sucks up the key after i

Re: [python-win32] passing c structure into python function

2010-01-13 Thread Tim Roberts
are many other ways, however. You could create a tuple from the struct elements, and pass the elements in their native types. You could even go to the trouble of creating a dict or an object in your C code, populate it, and return it. It depends on how often this will be used and who

Re: [python-win32] passing c structure into python function

2010-01-12 Thread Tim Roberts
Aahz wrote: > On Tue, Jan 12, 2010, Tim Roberts wrote: > >> I would pass the struct as a string of 14 bytes, then use >> emp_name, emp_ID = struct.unpack( '=10cI', incoming ) >> >> class employee: >> def __init__( self, name, id ): >&

Re: [python-win32] passing c structure into python function

2010-01-12 Thread Tim Roberts
f.name, self.id = struct.unpack( '=10cI', s ) f = open( 'testing', 'w' ) e = employee( 'Testing', 923 ) e.to_file( f ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] 'No such interface supported' question

2010-01-08 Thread Tim Roberts
spatch("ArcMap.Application") Then you can use methods on the "arc" object. Note that I'm just making up that name -- I don't know what the class really is. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-08 Thread Tim Roberts
Gertjan Klein wrote: > Tim Roberts wrote >> However, I'll bet I know what it is. CPUID trashes ebx, and in the x86 >> calling sequence, that's supposed to be saved and restored. >> > > That's it! Now, both Python 2.5 and 2.6 (and 3.1, if I c

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-08 Thread Tim Roberts
t to ebx internally. > I haven't looked at the cpuid instruction for years, but I'd push/pop > any register (other than EAX) it modifies, and in between them do the > cpuid and an appropriate move of whichever register. Well, cpuid is kind of an odd exception, because it m

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-07 Thread Tim Roberts
c public uses ebx, style:DWORD ... GetCpuidEdx proc public uses ebx, style:DWORD -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-06 Thread Tim Roberts
.5.2 on my Windows 7 64 system (using 32-bit Python). The C version works fine, but the assembler version gets a "DLL initialization error". I fixed that by adding "mov eax, 1" to the "start" routine. See if that helps

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-05 Thread Tim Roberts
Tim Roberts wrote: > Tim Roberts wrote: > >> J wrote: >> >> >>> On Tue, Jan 5, 2010 at 16:53, Tim Roberts wrote: >>> >>> >>> >>> >>>> C:\tmp>python >>>> Python 2.6.2 (r262:716

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-05 Thread Tim Roberts
Tim Roberts wrote: > J wrote: > >> On Tue, Jan 5, 2010 at 16:53, Tim Roberts wrote: >> >> >> >>> C:\tmp>python >>> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit >>> (Intel)] onwin32 >>>

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-05 Thread Tim Roberts
J wrote: > On Tue, Jan 5, 2010 at 16:53, Tim Roberts wrote: > > >> C:\tmp>python >> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit >> (Intel)] onwin32 >> Type "help", "copyright", "credits"

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-05 Thread Tim Roberts
" or "license" for more information. >>> import ctypes >>> c = ctypes.windll.cpuid >>> hex(c.GetCpuidEcx()) '0x444d4163' >>> hex(c.GetCpuidEdx()) '0x69746e65' >>> C:\tmp&g

Re: [python-win32] win32com calling IE: OLE error 0x800704a6

2010-01-05 Thread Tim Roberts
uot;. Is it possible this happens after a Windows Update has occurred but before the reboot? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Create a QueryInfo type Windows Shell Extension to provide InfoTip data in Windows Explorer

2010-01-04 Thread Tim Roberts
e, but this will show you the mechanics of it: http://timgolden.me.uk/python/win32_how_do_i/add-my-own-icon-overlays.html -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http:/

Re: [python-win32] Question concerning wmi c.CIM_DataFile

2010-01-04 Thread Tim Roberts
mes it has been downloaded, it might be called something different (like "...tree.zip" or "...tree(3).zip"). Further, the directory names you are using are configurable. They don't have to be called "Documents and Setting" or "Local Settings", and they don't have to be located on "C:". You should be using the shell folder APIs to find the names of the "well-known folders". Plus, the whole "Local Settings\Temp" folder is volatile. You should just be able to wipe out that whole directory without causing any damage. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Python com server error

2009-12-31 Thread Tim Roberts
a and even Windows 7. Well, that might be a problem if registration succeeded but you were unable to instantiate it. As I understand it, your problem is happening much earlier than that. Are you running this as an administrative user? -- Tim Roberts, t...@probo.com Providenza &a

Re: [python-win32] Python com server error

2009-12-30 Thread Tim Roberts
n in July? For a local server, some of the processing is up to you. If you want to register, you call win32com.server.register.UseCommandLine. If you want to run the server, you call win32com.server.localserver.serve. Do you have code to do that? What does your Server.py code look like? -- Tim Rober

Re: [python-win32] Python com server error

2009-12-30 Thread Tim Roberts
--regitser " as an argument it hangs. > I even tried to run it from the IDLE and also failed. That's misspelled. It should be "--register". -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 ma

Re: [python-win32] Python com server error

2009-12-30 Thread Tim Roberts
you typed that led to this. My first guess is that you have a mistake on the command line. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Read USB memory stick serial number

2009-12-29 Thread Tim Roberts
has remained the same since PnP was introduced, and it is vanishingly unlikely that it will ever change in the future. However, the official word is that you should treat the device path as an opaque token. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

<    2   3   4   5   6   7   8   9   10   11   >