NameError: name 'hook' is not defined [on hold]
NameError: name 'hook' is not defined [on hold]
enter image description hereafter running module in python2.7, python idle shows an error
================================ RESTART ================================
Traceback (most recent call last):
File "C:UsersHPDesktoptry.py", line 7, in <module>
hook.manager.KeyDown = OnKeyBoardEvent # tells what to do when the user press button
NameError: name 'hook' is not defined
This question appears to be off-topic. The users who voted to close gave this specific reason:
You need to define
hook
. Could we please see some code so we know what to fix if you need further help.– Simon
yesterday
hook
Asking a question would also help us greatly (so we don't have to guess what you want).
– Simon
yesterday
1 Answer
1
Hmm so it looks like you forgot to define hook
.
hook
If you just start with Python, I recommend some basic courses, like this one:
https://developers.google.com/edu/python/
or:
this one
both of them were created by google engineers.
If I made a mistake and you are well accustomed with Python, please tell us more about the problem.
I'm puzzled what kind of answer you expect.
– timgeb
yesterday