May you help me, pls...
I am using win7 ultimate. Installed version of python 2.5.1.1.
(ActivePython with pywin32)
I get the following msg:
import win32gui
print win32gui.GetCursorInfo()
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: function takes no arguments
Hi!
I'm testing Tims script from this site:
http://timgolden.me.uk/python/win32_how_do_i/print.html
to print a test image, and it works
however, it is in greyscale
Does anyone know how to print the test-image in colour?
Brgds
- Pehr Meldert
The python docs are pretty clear that there is no way to external stop a
thread and this was a design decision.
Typically, I have used a threading.Event to control the actions of the
worker threads from a loop in the main program.
Setup each worker thread as a loop using the event.wait() method
Jacob,
What you are looking at is called a thread pool. The simple case you
have now is that you start a thread whenever there is work to do
(playing a sound). The thread does this work, then exits. A thread
pool means you have a set number of threads idling and receiving work
via a queue. When
Thanks.
What have also found that seems nice/usable enough is to sort of implement a
class that inherits from threading.Thread, and then it runs the class's
functionality in the threaded background, and you can define other functions
and variables to check state if you want to - something like
Thanks.
winsound.PlaySound(file.wav, winsound.SND_ASYNC)
Does handle it asynchronously, but, yes, thanks for complete example.
Am in any case still trying to find/get hold of a sound library of some sort
that will do a bit more, like I want it to, and one called pyaudiere works
fine on my
Will check it out, but will also just say that a few of the game libraries I
have looked at already are of no interest to me, since they produce
inaccessible output/interfaces, but, will look into them a bit more for
sound output...:)
Have also gotten hold of another, sort of TTS module/wrapper
I installed in effectively the following order - dunno why before I seemed to
need to install specifically the amr64bit installations, but anyway - what it
now means is both pyaudiere and sound_lib sort of 3D sound packages will now
work on this machine, under python27 32bit installation: