So I'm writing a small Blackjack game and divided a class up into 2 to keep everything tidy but keep getting this little error:
global name 'handle_input' is not defined
The class being called...
#File: handle_input.py class handle_input: ...
The file defining the class...
#File: control.py from card import * from count import * from handle_input import * class control: def __init__(self): self.card_handle = card() self.count_handle = count() self.input_handle = handle_input() #<< This is the 'undefined' error
I use similar code else where and it works fine, however its not in a class. I'm thinking that might be contributing to the error but as you can see I'm defining other instances there (which aren't causing errors) so it can't be the problem.
Any comments appreciated,