I am running a script in python-3.2 on a Raspberry Pi 2 Model B
The thread looks like this:
myThread = threading.Thread(target=someFunction, args=(arg1,arg2,arg3),
daemon=True)
myThread.start()
Everytime this thread gets called. this error gets triggered:
TypeError: __init__() got an unexpected keyword argument 'daemon'
I know that there is not Python-3.4 stable version for the Debian Wheezy Version 7.10 hence I have to work around with python 3.2
Ironically, the Python 3.2 Documentation does state that daemon
is a boolean available.
What is this glitch and how can I solve this?
The daemon argument was added in version 3.3, see . Setting the flag in prior versions works like this:
myThread = threading.Thread(target=someFunction, args=(arg1,arg2,arg3))
myThread.daemon = True
myThread.start()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.