Re: [python-win32] How to take a snapshot of a specific control?

2006-12-11 Thread Ray Schumacher
At 02:53 PM 12/11/2006, Mark Hammond wrote: > These lines all execute: > dtwnd = win32gui.GetDesktopWindow() > hdcSrc = win32gui.GetWindowDC(dtwnd) > hdcDestH = win32ui.CreateDCFromHandle(dtwnd) The last line above is a problem - try something like hdcDestH = win32gui.GetDC(dtwnd) > hdcDes

Re: [python-win32] How to take a snapshot of a specific control?

2006-12-11 Thread Ray Schumacher
Thanks for the reply, At 08:06 PM 12/10/2006, Mark Hammond wrote: > I'm trying to do a fast desktop capture myself, and having DC/pyDC > confusion. I'm not sure exactly what this means, but I'm guessing you are having trouble with the pythonwin/win32ui GetSafeHdc objects, versus those used by

Re: [python-win32] screen capture and win32gui.GetDesktopWindow()

2006-12-07 Thread Ray Schumacher
.CreateDIBitmap etc., but that will take me some time, I think, and I'm not sure if it's the correct procedure anyway. Thanks, more tries tomorrow. Ray At 05:02 PM 12/6/2006, Tim Roberts wrote: Ray Schumacher wrote: > I've been mulling screen capture code. I tried PIL&

[python-win32] screen capture and win32gui.GetDesktopWindow()

2006-12-06 Thread Ray Schumacher
I've been mulling screen capture code. I tried PIL's ImageGrab().grab() (with pymedia) but find PIL's method to be pretty slow, ~4grabs per second max with no other processes. pymedia is pretty quick once I hand it the data. There has to be another way to get a copy or buffer() of the screen DC

Re: [python-win32] python and rtf

2006-08-18 Thread Ray Schumacher
/wxwin/ Best, Ray Schumacher At 09:28 AM 8/18/2006, you wrote: >You may be better off trying the various wx mailing lists - not many wx >people hang out here (I guess as most wx users are targetting more than >Windows!) > >Regards, > >Mark > >> -Original Message-

Re: [python-win32] sleep() for less than .001s?

2006-08-04 Thread Ray Schumacher
At 11:01 AM 8/4/2006, Tim Roberts wrote: >What surprises you? The Win32 Sleep() function takes integer >milliseconds. Thus, .1 will round to 0, which says "give up the CPU >only if a higher-priority task is waiting.". > >The default scheduling interval on your system is 16ms. Some Windows

Re: [python-win32] sleep() for less than .001s?

2006-08-04 Thread Ray Schumacher
At 10:29 AM 8/4/2006, Tim Roberts wrote: Ray Schumacher wrote: > I have been trying to use sleep() and kernel32.QueryPerformanceCounter > together; I want to delay until a particular tick without trying up > the CPU badly. > However, while time.sleep(.001) relieves the CPU, i

Re: [python-win32] sleep() for less than .001s?

2006-08-04 Thread Ray Schumacher
In the attached test code, I get - for test in [0, .1, .01, .001, .1] seconds # 2.9us hi 5.2us low, # 110ms hi and low, # 16ms hi and low, # 16ms hi and low, # 2.9us hi 5.2us low Intestingly, if I un-comment the #print '\r', then the processor usage drops by ~1

[python-win32] sleep() for less than .001s?

2006-08-03 Thread Ray Schumacher
qPC(byref(c1))     if c1.value>nextTTL+TTLHighDur: break     out(0x378, 0x00) #set all bits low     rotN += 1         if c1.value>endTick: break Ray Schumacher Blue Cove Interactive 8580 Production Avenue, Suite B San Diego, CA 92121 858.695.8801 http://Blue-Cove.com Disclaimer

Re: [python-win32] [Python-Dev] Still looking for volunteer to

2006-03-15 Thread Ray Schumacher
I wrote a little ditty to set Win volume, which will also check for what you want (attached) On my system, just running it prints: C:\projects\sound>PYTHON VOL.PY cbStruct 24 dwControlID 1 cChannels 1 cMultipleItems 0 cbDetails 4 paDetails c_ulong(32639) waveOutGetNumDevs= 1 mixerGetNumDevs 1 r

Re: [python-win32] COM ports connecting

2006-02-21 Thread Ray Schumacher
At 10:51 AM 2/21/2006, Math wrote: Hello,   Anybody could give me an example code of how connect/comunicate through COM ports (i.e. COM1, COM2). I'm under windows XP I'm working on a command module for telescopes over COM ports, http://rjs.org/Python/LX200.zip so look at LXSerial.py and the  co

Re: [python-win32] ATT DSP32C to IEEE

2006-01-13 Thread Ray Schumacher
Thanks Thomas Is there not much call for DSP32 use, with Python? A modified Python float() function, that accepts IEEE or DSP32 would be ideal. Something like: float(string, type=DSP32) For now, my last posted implementation is sufficient. arrf = array.array('f') DSP32ToIEEE(arrf, struct.unpack('

Re: [python-win32] ATT DSP32C to IEEE

2006-01-06 Thread Ray Schumacher
Following myself, I just made two new methods using array and struct, if anyone's interested: def _DSP32ToIEEE(fh, address): """ bytes == 4 to convert from DSP32C binary files smmm to IEEE float seee emmm """

Re: [python-win32] ATT DSP32C to IEEE

2006-01-06 Thread Ray Schumacher
At 08:00 AM 1/6/2006, Thomas Heller wrote: >RayS <[EMAIL PROTECTED]> writes: > >> I'm trying to find an efficient way to convert from DSP32C binary files >> smmm >> to IEEE float >> seee emmm >> >> I tried struct and bit-shifting from a C ma

[python-win32] WindowsError: (0, 'The operation completed successfully') with compiled prog only

2005-09-14 Thread Ray Schumacher
process.PIPE, stdout=subprocess.PIPE     )     return proc.stdout.readlines() I've tried many variations, but all (so far) leave a "LAUNCHER.EXE.log" with this error, even if command ="anything else".. If 'The

[python-win32] list/kill processes on Win9x and NT+...

2005-07-12 Thread Ray Schumacher
ick app to kill unauthorized process and compiled with py2exe. Does anyone have a way to list/kill without the external process that works in all 9x and XP? Ray Schumacher #!/usr/bin/env python import win32process, win32con import time import subprocess whiteList = ["Eudora.exe", "E

Re: [python-win32] system() fails, win32process succeeds

2005-06-29 Thread Ray Schumacher
Hi Roger, At 12:42 PM 6/29/2005, Roger Upole wrote: >I ran into something similar a while back that turned out to be a deficiency >in the called >program. It wasn't taking into account the fact that it might not be able >to acquire resources in a timely manner. I think that is the case, but

Re: [python-win32] filling Windows properties "Summary" tab?

2005-06-28 Thread Ray Schumacher
At 10:06 AM 6/24/2005, R. Alan Monroe wrote: >> They are per-file settings, but, if I filled them in for a .py file, >> they would persist only on this machine, but not if the file is >> copied to another Windows box, and are unavailable on the Samba >> server. > >Try it with an .mp3 file. I bet i

Re: [python-win32] filling Windows properties "Summary" tab?

2005-06-24 Thread Ray Schumacher
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ray Schumacher Sent: Friday, 24 June 2005 8:14 AM To: python-win32@python.org Subject: [python-win32] filling Windows properties "Summary" tab? The Summary tab of of a file's properties has Tit

[python-win32] filling Windows properties "Summary" tab?

2005-06-23 Thread Ray Schumacher
The Summary tab of of a file's properties has Title, Subject, Author, etc. Could those be filled in via py2exe or ? I tried them as attributes of Target; no error, but no result.     Ray ___ Python-win32 mailing list Python-win32@python.org http://m

[python-win32] dde.pyd always dies after exactly 16378 Requests

2005-05-26 Thread Ray Schumacher
In the attached .py test, I start an external program that provides data access via DDE. create a server do a number of CreateConversation-s, one for each channel make connections do lots of .Request on the connections I tried just one channel, one connection, still 16378, so it seems to be the t