Re: [python-win32] How to calc amount of avail RAM in a process ?

2009-01-30 Thread Tim Roberts
nused physical memory remaining. Virtual memory is a surprisingly difficult thing to nail down. -- 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] Pb SxS for install

2009-01-30 Thread Tim Roberts
its own #1 manifest. Does the python26.dll manifest override it? I'm not sure the answer is written down anywhere. Side-by-side is an abortion. It is an incredibly baroque solution to a problem that programmers outside of Redmond learned how to handle more than a decade ago. -- Ti

Re: [python-win32] LVM_GETITEMPOSITION

2009-02-06 Thread Tim Roberts
actually allocates a piece of memory in Explorer's process, then uses WriteProcessMemory and ReadProcessMemory to copy the data in and out. Here's the code in VB, but it's very easy to screw this up with disastrous results: http://www.vbforums.com/archive/index.php/t-546207.html -

Re: [python-win32] COM with timeouts?

2009-02-09 Thread Tim Roberts
spond. And if word has displayed a modal error box, it's not trivial to kill it in a clean 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] numpy and pylab on win64 ?

2009-02-11 Thread Tim Roberts
but am wondering if > installing the 32bit version would still work on my xp64 platform. > If you install 32-bit Python, then the 32-bit add-ons continue to work just as they always have. If you install 64-bit Python, then you need 64-bit add-ons. Numpy, at least, uses C extensions. --

Re: [python-win32] Slow convert collection to list (search a fast way)

2009-02-11 Thread Tim Roberts
(very) slow(*). I tried [i for i in tobj] ; I tried with iter ; >with 'for' ; etc. All is slow. >(*) slow: 0.7 seconds for len=1000 > >Who know a way for fast get the collection like LIST? You think 700 microseconds for a COM transaction is slow? Perhaps it is your expec

Re: [python-win32] Error with VixCom operation; TypeError: The VARIANT type is unknown (0x00000015)

2009-02-17 Thread Tim Roberts
. VARIANT type 0x15 is VT_UI8 -- a 64-bit integer. It's kind of loony for an API to use a 64-bit integer as an error number, but that's what they're doing. As Mark said, pywin32 doesn't support VT_UI8 at all. There may be a hacky way to do this with comtypes. -- Tim Roberts,

Re: [python-win32] Accessing Interfaces

2009-02-20 Thread Tim Roberts
These DirectWrite interfaces are still in beta (they are Win 7 only), so I seriously doubt anyone has played with them enough to know whether they do IDispatch. If they don't, it's always (well, almost always) possible to handle these with ctypes and comtypes. -- Tim Robe

Re: [python-win32] Accessing Interfaces

2009-02-20 Thread Tim Roberts
pywin32 wrappers yet. So, if you really need to do this with Python, you will end up using ctypes to call DWriteCreateFactory, and ctypes/comtypes to call the member functions. Are you sure you want to do this? ;) Until someone writes a wrapper layer, it would probably be more productive

Re: [python-win32] opening files with names in non-english characters.

2009-02-24 Thread Tim Roberts
s." Make sure that your path > argument is a unicode object. > THIS is the solution to his 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] Unreliable results with Winreg & WMI

2009-02-25 Thread Tim Roberts
anaged to handle the exact same issues during the 16-to-32 transition 15 years ago. You can suppress this redirection by calling RegDisableReflectionKey for the key you want to talk to. I do not know if this is exposed in _winreg. -- Tim Roberts, t...@probo.com Providenza & Boekelhei

Re: [python-win32] Unreliable results with Winreg & WMI

2009-02-25 Thread Tim Roberts
Tim Roberts wrote: > Ben wrote: > >>> I have generally been getting better results using winreg than using WMI, >>> but even Winreg (or config problems on our server) are causing me >>> problems. For example I'd use this code to find out if a certain >&

Re: [python-win32] Need help in MKS

2009-03-10 Thread Tim Roberts
d not get some thing for basics). You will have to be more specific about what you hope to accomplish. Your target is way too broad. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@pytho

Re: [python-win32] Need help in MKS

2009-03-11 Thread Tim Roberts
e are three VERY different kinds of tasks, requiring very different approaches. The more specific you can be, the better the advice we can offer. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-

Re: [python-win32] Need help in MKS

2009-03-12 Thread Tim Roberts
or handicapped folks. I think it will do what you need. This is Windows only. Linux will require a different approach, but then, you did ask this question on a Python-for-Windows mailing list... -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] PyCSlider notification messages

2009-03-17 Thread Tim Roberts
ROLL messages from a normal scroll bar, > but either the Slider isn't sending them or I'm > somehow failing to intercept them. Remember that a slider oriented vertically will produce WM_VSCROLL messages... -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. __

Re: [python-win32] GDI+ text rendering screwed up

2009-03-19 Thread Tim Roberts
ic 48" in black-on-yellow. Do you really have a font called "Times"? The TrueType font is actually called "Times New Roman". There is a "substitution" list for common font names, but I'm not sure I'd want to rely on it. -- Tim Roberts, t...@probo.com

Re: [python-win32] is these modules available for IA64bit

2009-03-30 Thread Tim Roberts
ong.Please correct me and help me on achiving > this? > > Also i want to know if "wmi" module is availble for IA64 There is virtually no real development going on for IA64, because there are virtually no sales of IA64 systems. -- Ti

Re: [python-win32] Specifying an initial directory name for win32ui.CreateFileDialog()

2009-03-30 Thread Tim Roberts
tructure from the common dialog. You can call dlg.SetOFNInitialDir( 'xxx' ) to set the initial directory before you call dlg.DoModal() to display the dialog. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Might be a easy problem.

2009-04-06 Thread Tim Roberts
in32". If so, we wouldn't know anything about that in this forum. You'd have to check the IDE's documentation. -- 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] Monitoring the active window

2009-04-10 Thread Tim Roberts
our free unlimited mail today <http://www.walla.co.il> That's amazing. When someone uses the term "Walla!" like that, in virtually every case it is an ignorant rendition of the French word "Voila!" I'm amazed that a real company would choose that as a name.

Re: [python-win32] win32gui.GetMenu() return 0

2009-04-16 Thread Tim Roberts
That's because Internet Explorer does not have a main menu in the traditional Windows API sense. Instead, it creates a whole series of movable "toolbars", one of which happens to look like a menu. What are you actually trying to do? -- Tim Roberts, t...@probo.com Providenza &a

Re: [python-win32] win32gui.GetMenu() return 0

2009-04-16 Thread Tim Roberts
ld be better for you to try to find out about the Internet Explorer object model, to see if you can use that COM object you already created to access the tools through function call instead. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] win32gui.GetMenu() return 0

2009-04-17 Thread Tim Roberts
omating other applications. This is a Python wrapper around the Microsoft Active Accessibility library. http://www.cs.unc.edu/Research/assist/developer.shtml -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailin

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread Tim Roberts
s it can. Go check here: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall Every subkey represents an app or update that can be uninstalled, and each key contains an UninstallString value that gives you the command to execute to do the uninstall. -- Tim Roberts, t...@probo.com Provi

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread Tim Roberts
Only the uninstall app knows that. You probably had extra files in the folder that weren't installed by the installer. Most uninstall apps will not delete the root folder if it contains files that were created after installation time. -- Tim Roberts

Re: [python-win32] Extract icon from exe files

2009-04-20 Thread Tim Roberts
other is the color image. Those are HBITMAP handles. You can then use GetBitmapBits to get the actual pixels. It's possible this might be easier in C. -- 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] activate an opened window

2009-04-23 Thread Tim Roberts
te through all of the top-level windows using EnumWindows, then call GetWindowThreadProcessId until you find a window that matches. Remember that an application can have several top-level windows. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] activate an opened window

2009-04-23 Thread Tim Roberts
u are trying to do, in detail. -- 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] activate an opened window through the server

2009-04-23 Thread Tim Roberts
o run this through a web server? What is your overall plan here? -- 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] activate an opened window through the server

2009-04-23 Thread Tim Roberts
x27;t understand how this all relates to a web server. -- 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] activate an opened window through the server

2009-04-23 Thread Tim Roberts
send it back as an HTML image. It would take a lot of experimentation, but it might be possible. -- 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] activate an opened window through the server

2009-04-23 Thread Tim Roberts
ss, using that command you already showed. You can use subprocess.call to run that command and wait for the result. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.

Re: [python-win32] activate an opened window through the server

2009-04-24 Thread Tim Roberts
do this from a CGI process. I said "almost" because you have a backslash problem there. You either need to double the backslashes: cmd = 'idlede.exe ... -nosplash @C:\\SAMIR\\soil.run' or use the "r" syntax: cm

Re: [python-win32] Extract icon from exe files

2009-04-24 Thread Tim Roberts
cluding one that calls ExtractIconEx and draws the icon to a bitmap? -- 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] Extract icon from exe files

2009-04-27 Thread Tim Roberts
the trouble of trying to extract the bitmaps from the icon and manipulate them in somewhat to get a usable image. -- 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] Extract icon from exe files

2009-04-28 Thread Tim Roberts
ap, THEN pull the bits from the bitmap. The icon doesn't actually contain bitmaps. It contains arrays of pixels, but you need them to be a bitmap. > On the demo, hicon is use ton create the variable nid and re use it to > display on the screen, but i want get only the bitmap bits. I

Re: [python-win32] Retrieve informations from NIST file.

2009-04-29 Thread Tim Roberts
x27;, 'rb' ) You probably need to examine this file with a hex editor to figure out what it really contains. If you want, you could send me one of the files, and a detailed description of what you want out of them. Perhaps we can come with a data structure that&#x

Re: [python-win32] Retrieve informations from NIST file.

2009-04-30 Thread Tim Roberts
\x1fNA\x1e04\x 1fNA\x1e05\x1fNA\x1e06\x1fNA\x1e07\x1fNA\x1e08\x1fNA\x1e09\x1fNA\x1e10\x1fNA', ' 2.233:\xc8\xcf\xe6\xe4', '2.235:1011973400606'] >>> Here, "sections" contains the three major sections. "rec1" contains the records from the first section. If you wanted to add a "1.013" record to the first section, you could say: rec1.append( "1.013:Cool Beans" ) and then rebuild the file by saying: newsections = ['\x1d'.join(rec1), '\x1d'.join(rec2), sections[2]] open('newfile.nst','wb').write ('\x1c'.join(newsections) ) But that assumes there's nothing in that garbage 3rd section that needs to be changed. It's just a matter of dividing the problem up into smaller problems until the solution pops out. -- 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] Extract icon from exe files

2009-04-30 Thread Tim Roberts
Nicolas EISEN wrote: > Tim Roberts a écrit : >> EISEN Nicolas wrote: >> >>>> >>>> >>> I'm lucky, I found ... >>> >>> My Source : >>> >>> /from win32gui import * >>> import

Re: [python-win32] What is the meaning of -1. #IND?

2009-05-04 Thread Tim Roberts
nity (1#INF), but dividing 0 by 0 results in "indefinite" because it has no defined meaning. -- 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] Fwd: First line is a mix of text characters and binary, after the first line all is binary.

2009-05-05 Thread Tim Roberts
; ) # Now I can add or remove parts in either of the first two sections. # ... # Now, I'm ready to write my changed parts back to a new file. part1 = '\x1D'.join( sect1 ) part2 = '\x1D'.join( sect2 ) recreate = '\x1C&#

Re: [python-win32] Extract icon from exe files

2009-05-05 Thread Tim Roberts
do "dir(hdc)" to find out what functions are available in a DC? hdc.FillSolidRect( (0,0, ico_x, ico_y), 0xffffff ) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http

Re: [python-win32] Silent installation of pywin32

2009-05-08 Thread Tim Roberts
ke py2exe will automatically pull in whatever pieces of pywin32 are necessary to make your script run. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mai

Re: [python-win32] Win32 robustness against Microsoft version changes

2009-05-11 Thread Tim Roberts
xperience > or estimate about this risk (we currently use Office2003 on WinXP)? > With very few exceptions, Microsoft never removes a documented API. The risks, although not zero, are very slight. The same cannot be about, for example, Adobe... -- Tim Roberts, t...@probo.com

Re: [python-win32] python win-32, 64-bits, and services

2009-05-12 Thread Tim Roberts
nto empty space. > Anyone have any ideas? I'll try to put together a succinct test case > that I can share. I would be interested in looking at it. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 maili

Re: [python-win32] Pylons as service...

2009-05-18 Thread Tim Roberts
wouldn't see that message. It's true that this is not the normal way to stop a service. You'll see in that same Pylons script that they have commented out a call to assert the "stop_event" event, which the SvcDoRun function is blocked on. That's the normal way. S

Re: [python-win32] Pylons as service...

2009-05-19 Thread Tim Roberts
out to the matching key in the registry (HKLM\System\CurrentControlSet\Services\service_name) and gets the value from the PythonClass default value. That's how it knows which file to load and which class to instantiate. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] (no subject)

2009-05-20 Thread Tim Roberts
e=constants.xlPasteFormats ) The win32com.client constants only get imported if you have run makepy on the Excel.Application typelib. -- 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 arrays by reference

2009-05-20 Thread Tim Roberts
ion. I'm guessing you need something like this: ans = [1,2,3] (rc,ans) = Server.EchoArray([0x11,0x22,0x33]) print ans -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@pyth

Re: [python-win32] Fwd: URGENT! Changing IE PAC Settings with Python

2009-05-20 Thread Tim Roberts
e instructions here: http://nscsysop.hypermart.net/setproxy.html This might be a good excuse to force your stragglers into the domain. There is certainly good justification for doing so. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Converting types for deep lists or Discitonnaries

2009-05-21 Thread Tim Roberts
3}, 777], (99, 100)] >>> The string can be converted back to a data structure using eval, with appropriate caution. There's also the option of using "pickle", which was designed to serialize and deserialize Python data structures. -- 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] Converting types for deep lists or Discitonnaries

2009-05-21 Thread Tim Roberts
Paul Koning wrote: >>>>>> "Tim" == Tim Roberts writes: >>>>>> > > > Tim> The string can be converted back to a data structure using eval, > Tim> with appropriate caution. > > How is that different from the

Re: [python-win32] CreateURLMonikerEx and Win2000

2009-05-22 Thread Tim Roberts
Google would have brought you to the MSDN page for CreateURLMonikerEx, which says IE 5.5. The MSDN pages are usually very good about identifying the minimum versions required for each API. -- 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] writing hyphenated values in csv

2009-05-22 Thread Tim Roberts
switching to Excel's XML format. You have a great deal more control in that case. -- 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] win32job.SetInformtionJobObject usage -- what am I doing wrong?

2009-05-26 Thread Tim Roberts
b.SetInformationJobObject(job, > win32job.JobObjectExtendedLimitInformation, > extended_limits) > You also need this before the Set call: extended_limits['BasicLimitInformation']['Limit_Flags'] += win32job.JOB_OBJECT_LIMIT_JOB_MEMORY What do you plan to do with th

Re: [python-win32] how to get the statusbar text of a window?

2009-05-29 Thread Tim Roberts
dow classes for all of their controls. They don't respond to normal window messages from the outside. The Office applications don't use separate windows for their controls; their windows are just one big empty canvas, where everything is painted int

Re: [python-win32] how to use CreateProcessWithLogonW

2009-06-01 Thread Tim Roberts
> Unfortunately, this is a maze of twisty passages, all alike. It is a complicated and not well known part of the Windows API, and you will end up doing a lot of very frustrating experimentation. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] how to use CreateProcessWithLogonW

2009-06-02 Thread Tim Roberts
Emin.shopper Martinian.shopper wrote: > On Mon, Jun 1, 2009 at 1:32 PM, Tim Roberts wrote: > >> Emin.shopper Martinian.shopper wrote: >> >>> Dear Experts, >>> >>> Can someone provide an example of how to use CreateProcessWithLogonW? &g

Re: [python-win32] Question?

2009-06-05 Thread Tim Roberts
up a lot of [your] disk space". I have quite a number of extra packages installed, and my entire Python directory is only 133 megabytes. At today's disk prices, that's less than 8 cents worth of disk space. -- Tim Roberts, t...@p

Re: [python-win32] Regarding build of code using Visual Studio in python

2009-06-16 Thread Tim Roberts
rce.exe" files. As long as you have the environment variables set up properly (by calling vcvarsall.bat or vcvars32.bat, depending on the version), it's just a matter of calling the command line compiler using subprocess or os.system: cl source.c -- Tim Rob

Re: [python-win32] win32file.CreateSymbolicLink and SYMLINK_FLAG_DIRECTORY

2009-06-16 Thread Tim Roberts
mlink would be is > already taken up by something), but not others (when the user doesn't > have the appropriate permissions for creating symbolic links). > Hmm. Does the API return anything in those cases? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. __

Re: [python-win32] win32file.CreateSymbolicLink and SYMLINK_FLAG_DIRECTORY

2009-06-16 Thread Tim Roberts
vs.sourceforge.net/viewvc/pywin32/pywin32/win32/src/win32file.i?revision=1.107&view=markup -- 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] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
it, you run it: fbat = open( "xxx.bat", "w" ) print >> fbat, "echo I'm inside a batch file" print >> fbat, 'call "c:\\Program Files\\Microsoft etc\\vsvars32.bat'" print >> fbat, 'msbuild myproject.sln&#

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
nently set environment variables is: > -Right-click on "My Computer" > -select "Properties" > -select "Advanced System Settings" > -click on "Environment Variables" Although this is true, the better solution for "a h" is to create a batch fi

Re: [python-win32] regarding invoking command prompt using python

2009-06-17 Thread Tim Roberts
putenv(), then YOU can call getenv() and see the changes you made to your environment. However, when you exit, all of your changes evaporate with your process. The parent process, whatever it is, continues to exist with the environment it had before. -- Tim Roberts, t...@probo.com Providenza &

Re: [python-win32] regarding invoking command prompt using python

2009-06-18 Thread Tim Roberts
ironmentVariable('x') 'test' >>> os.system('set x') x=test 0 >>> Compare this to: C:\tmp>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credit

Re: [python-win32] regarding invoking command prompt using python

2009-06-18 Thread Tim Roberts
Vernon Cole wrote: > Thanks, Tim! > > Should this be logged against the standard library as a bug? Nope. It's actually the documented behavior. See section 16.1.1 here: http://docs.python.org/library/os.html -- Tim Roberts, t...@probo.com Providenza &

Re: [python-win32] python and wow64 filesystem redirection

2009-06-23 Thread Tim Roberts
hough... I use this: import ctypes k32 = ctypes.windll.kernel32 wow64 = ctypes.c_long( 0 ) k32.Wow64DisableWow64FsRedirection( ctypes.byref(wow64) ) # ... do stuff ... k32.Wow64EnableWow64FsRedirection( wow64 ) -- 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] Active-X control

2009-06-23 Thread Tim Roberts
ols expect to be installed as components in a GUI. Your Python example doesn't set up a GUI. Does it work in Matlab if you omit the coordinates, like this? h_pa5 = actxcontrol('PA5.x') If not, then you have more work ahead of you. You'll have to create a window and a m

Re: [python-win32] Shell extension debugging

2009-06-29 Thread Tim Roberts
rocess. You can try using the logging module to log to a file, or you can use ctypes to write to kernel32.OutputDebugString and using a kernel debug log monitor to read them. -- 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] Shell extension debugging

2009-06-29 Thread Tim Roberts
ldn't want to kill that one... > That's exactly what you want to do. It's perfectly safe. The kernel monitors that process and restarts it when it dies. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ pytho

Re: [python-win32] Shell extension debugging

2009-06-29 Thread Tim Roberts
eaking the formatting and the framework is trivial. > I read somewhere that debugging a C++ shell extension is possible under > Visual Studio; can I assume that something like that is not viable when > using Python / PyWin32? > I would be very surprised. You need to be abl

Re: [python-win32] Shell extension debugging

2009-06-30 Thread Tim Roberts
ource modules and DLLs together into a single unit. When you run a py2exe app, it just unzips the contents to a temporary directory and launches the interpreter as usual. -- 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] Shell extension debugging

2009-06-30 Thread Tim Roberts
ut, and there's no good way to transfer it. > (I wish I could somehow pass icons to the > submenus, but it seems that for that you need completely owner-drawn > menu items, and that seems like a daunting task!) > Correct. I decided against that in my own version. -- Tim Robert

Re: [python-win32] File Time: win32file vs Python ?

2009-07-02 Thread Tim Roberts
e its timestamps in UTC. os.path.getmtime adjusts to local time. FAT file systems record timestamps in local time, which causes the reported times to change during summer time. -- 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] Examples of Win32Inet use

2009-07-07 Thread Tim Roberts
eed to specify at least WINHTTP_AUTOPROXY_AUTO_DETECT. > Disclaimer CALYON UK: > This email does not create a legal relationship between any member of the ... > I have to say, your messages carry the most obnoxious legal disclaimer I've encountered in a long, long time. The ef

Re: [python-win32] Examples of Win32Inet use

2009-07-07 Thread Tim Roberts
spondents, and the lawyers couldn't really assert that they had any value at all. -- 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 parser for Windows Event Logs

2009-07-10 Thread Tim Roberts
>> win32evtlog.OpenBackupEventLog should let you access arbitrary evt files. >> > > This call also requires the system name as the first argument. > int = OpenBackupEventLog(serverName, fileName ) > Or "None". You have to read th

Re: [python-win32] Python parser for Windows Event Logs

2009-07-16 Thread Tim Roberts
5 (which is right), the enumeration only returns 1 entry if I read backwards, and 2 if I read forwards. I shall experiment. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://

Re: [python-win32] Python parser for Windows Event Logs

2009-07-16 Thread Tim Roberts
,flags,0) if not events: break for event in events: print event.EventID, event.StringInserts then it all works as expected. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list pyth

Re: [python-win32] Python parser for Windows Event Logs

2009-07-17 Thread Tim Roberts
214. Perhaps I should send you the C version of the same program that I wrote for testing, to see if it behaves differently. The code in pywin32 doesn't do that much processing -- it's mostly passthrough. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Python parser for Windows Event Logs

2009-07-17 Thread Tim Roberts
It shouldn't make one whit of difference. The format of the .evt file is the same, no matter which log it came from. You are reading an .evt file, and not the live log, right? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Python parser for Windows Event Logs

2009-07-17 Thread Tim Roberts
mmand line like "testevt xxx.evt") and see if it reads all 6 messages. If it only gets 3, then there is some fundamental issue below the Python stuff. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 ma

Re: [python-win32] python-win32 Digest, Vol 76, Issue 17

2009-07-17 Thread Tim Roberts
Tony Cappellini wrote: > Tim, would you try parsing the "SystemEventLog" (from Windows XP)? > This is the one I'm having problems with, not the application log. > I saved a copy of my system event log with 2,383 events, and I'm able to read all 2,383 events. --

Re: [python-win32] handle is invalid?

2009-07-22 Thread Tim Roberts
xactly the same handle that GetForegroundWindow already gave 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] Trying to grab exe of foreground window

2009-07-22 Thread Tim Roberts
mean the processes original exe. So, you can replace those last four lines with: print win32process.GetModuleFileNameEx( handle, 0 ) -- 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] Trying to grab exe of foreground window

2009-07-23 Thread Tim Roberts
es trying to map the C parameters into Python code, but once you get the pattern, that's not so hard. -- 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] IADsContainer.GetObject returns objects of different type than IADsContainer.Create

2009-08-03 Thread Tim Roberts
using dir() to look at the list of methods? That's not reliable with COM objects, unless you have used makepy on them. The win32com stuff doesn't go query the complete list of methods and properties. When you ask for one, it checks for it, and will remember that for later. -- Ti

Re: [python-win32] Dealing with windows in Windows

2009-08-04 Thread Tim Roberts
g" by > WSH. Then I will have 100% Python script without any others. If you post your WSH script, perhaps we can translate it for 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] Why can I compile a C extension if I replace python25.lib with python25.dll?

2009-08-07 Thread Tim Roberts
se python25.dll. It can't -- it's not in the right format. The linker needs the .lib. Then, when you run the app, the DLL must be accessible somewhere. Does the build process try to test the extensions? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Why can I compile a C extension if I replace python25.lib with python25.dll?

2009-08-07 Thread Tim Roberts
s your Python version, and use that to build your extension. -- 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 passing a buffer to an ActiveX object via win32com

2009-08-07 Thread Tim Roberts
hould be a sine > wave). I'm a bit confused and not sure what the best way to proceed > at this point is. How do a pass a pointer to my array into the > ActiveX method? Whatever you do is going to be a hack, because it's not declared in a C

Re: [python-win32] determining information about a window

2009-08-10 Thread Tim Roberts
hrough, then I think we can help you create a program that does the same thing. -- 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] determining information about a window

2009-08-11 Thread Tim Roberts
ents, etc. Some of this comes from APIs that send messages (like GetWindowText), some from the data structures (GetWindowLong, GetClassLong), some from enumerations (EnumChildWindows), and so on. So, if you can tell us how YOU would tell the difference, we can suggest

Re: [python-win32] Array of 64 bit int

2009-08-11 Thread Tim Roberts
e, so the question needs a little clarification. -- 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] Some problems with instantiating a type library

2009-08-14 Thread Tim Roberts
.sleep(3) > Rhino.Visible = True > RS = Rhino.GetScriptObject > RS = RhinoScript(RS) > RS.AddLine((0,0,0), (1,1,1)) > None of us can "try this" unless we have the Rhino4 application installed. What do you see? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] I want to get a message when the screen is locked/unlocked. How?

2009-08-25 Thread Tim Roberts
... WM_WTSSESSION_CHANGE is 0x02b1. > Also, is this the appropriate method as the docs state that it > requires Windows Terminal > Services loaded (which I don't have running). Starting with XP, all systems run with Windows Terminal Services enabled. That's how fast user swit

Re: [python-win32] Excel Calculation - Check when it's done

2009-08-25 Thread Tim Roberts
; > Does anyone have any examples? Assuming you can register yourself as an event sink, there is a Worksheet_Calculate event that gets fired any time Excel recalculates a cell. However, it gets hit an awful lot. -- Tim Roberts, t...@probo.com

Re: [python-win32] Excel Calculation - Check when it's done

2009-08-26 Thread Tim Roberts
. > Also, are there many event sync examples in Python? > I found quite a few, most using the very handy comtypes module: http://www.lmgtfy.com/?q=python+excel+event+sink -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

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