Re: Screen capturing on Windows
Rune Strand schrieb: > Is it possible by use of pyWin32 or ctypes to make a screen capture of > an inactive, or a hidden window if the hwnd/WindowName/ClassName is > known? I've seen dedicated screen capture software do this. While > PIL.ImageGrab.grab() is excellent, it will only capture the foreground > of the desktop. I've tried for hours, but I soon get helplessly lost in > the labyrinths of the Win32API. As it says: the window is hidden. You can not make a screen shot of a hidden window 'cos it has no visual representation at the very moment. Simply show it. And if you do not want to see it while it's shown show it somewhere out of the bounds of your virtual screen. regards Juergen -- http://mail.python.org/mailman/listinfo/python-list
ANN: Eric3-IDE documentation and wiki
Happy to announce that the Eric3 python IDE has found a home for its documentation and wiki! Currently effords are taken to document the user interface of the Eric3-IDE. The documentation and wiki project is hosted at http://ericide.python-hosting.com/ . Everyone interested in Eric is heartly invited to take part in the ongoing effords, drop comments or whatever to help to improve usability of the IDE for the python comunity. What is Eric ? Eric is an advanced open source Python and Ruby IDE based on the pyQt GUI toolkit written and maintained mainly by Detlev Offenbachs. Currenlty usage on windows oses is quite limited due to Qt3 licence issues . This is going to change as soon as Eric is ported to pyQt4 with full GPL licence support for open source developers. See http://www.die-offenbachs.de/detlev/eric3 or http://ericide.python-hosting.com/ or for a more detailed description. Juergen Urner -- http://mail.python.org/mailman/listinfo/python-list
Re: Time to bundle PythonWin
The ctypes.com package is no longer part of ctypes. It has been split by Thomas Heller into a separate package comtypes. See: http://sourceforge.net/projects/comtypes/ Still in its childhood but as easy as com can get, I guess, way easier and better than pythonWin at least. Juergen -- http://mail.python.org/mailman/listinfo/python-list
Re: ANN: uuid-0.1 Released
I would like to contact Ka-Ping Yee, but got no answer to my emails so far. Maybe s.o. knows how to contact Ka-Ping Yee. BTW persistant storage for clock sequence is not implemented in my module so far. I will consider it for the next release. Any ideas how to implement ? -- http://mail.python.org/mailman/listinfo/python-list
Re: Partially unpacking a sequence
>> Thank you, everyone, for resolving my question. At one point, while >> trying to solve the problem, I typed >> > y[1,3] >> >> Traceback (most recent call last): >> File "", line 1, in ? >> TypeError: list indices must be integers >> >> The error message gave me no clue as to what I was doing wrong (in my >>mind, I was just writing out the elements of a range), and I thought >> perhaps that my inclusion of a comma was the problem. Perhaps a more >>explicit error message would have helped. The error message is correct because in y[1, 3] "1, 3" is recognized by the interpreter as tuple. Python goodie or snakebite that is... -- http://mail.python.org/mailman/listinfo/python-list
calculating system clock resolution
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white sheet of paper stiring at me. Lame I know. import time t1 = time.time() while True: t2 = time.time() if t2 > t1: print t1, t2 # start calculating here break BTW t1 and t2 print out equal up to the fraction on my machine. What does python know that I don't? A pointer to the source lines where this is implemented would even be helpfull to clear this out. Can't seem to find it. Anyone any ideas? -- http://mail.python.org/mailman/listinfo/python-list
Re: how you know you're a programming nerd
Keep on coding. It'll just go away.. -- http://mail.python.org/mailman/listinfo/python-list
Re: calculating system clock resolution
Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires to return the next tick of the clock. Should be about 0.01ms but this may differ from os to os. BTW (I'm new to linux) cat /proc/cpuinfo is nice but I have 2457.60 bogomips. Is this something i should be concerned about? I mean is this contageous or something ;-) -- http://mail.python.org/mailman/listinfo/python-list
Re: calculating system clock resolution
def calc_time_res(): now = time.time start = now() x = start while start == x: x = now() print x, start # <-- print x - start print calc_time_res() >> 1.50203704834e-05 Something is going wrong here. If you look at the function ,time.time() returns time in microseconds (most oses and so does mine). So the calculation goes, lets say 1.23 - 1.24 How can the result be something like 1.50203704834e-05 ? I would expect 0.01. Next is, the first print statement prints out x and start equal up to the fraction. Is it Python giggeling? Maybe it's python throwing the rounded float at us but internally keeps calculating with the float returned by the os. Maybe I'm wrong. -- http://mail.python.org/mailman/listinfo/python-list
Re: calculating system clock resolution
Starts getting confusing... on linux I get print time.time() >> xxx.23 Is it mentioned somewhere that print truncates floats ? Thats new to me. Kinda surprising that is. print '%.30' % time.time() >> xxx.23456678990... I knew it must have been hiding somewhere On windows I'd expect a resolution of round around 15ms. Thats why I fell for the trap assuming linux is operating on about the same. Anyway. As far as I can see there is no nice way except for the brute force loop to calculate this resolution. This was giving me head sratches and thats why the loop in the initial post was so shamelessly empty. I was thinking about the poor dudes running an os with a resolution of about 1 second. I was hoping for s.o. releasing an ace from his sleeve. Well, there seems to be no way to know except knowing. Or like Sege Orlov put it >> I think the number of samples to take depends on resolution ;-) Crappy oses that is. Time for them to get standardized. -- http://mail.python.org/mailman/listinfo/python-list