Below is my code . I am unable to call functons of google_charts class in my Demo class. Help me fix the problem.
class google_charts:
def all_files_to_one():
pass
prods = []
srcs = []
sname = []
def process_compiled():
global prods, srcs, sname
sname.append('something')
prods.append('something')
srcs.append('something')
def demo():
google_charts.all_files_to_one()
google_charts.process_compiled()
demo()
The output:
Traceback (most recent call last):
File "C:\\demo.py", line 18, in <module>
demo()
File "C:\\demo.py", line 15, in demo
google_charts.all_files_to_one()
TypeError: unbound method all_files_to_one() must be called with google_charts instance as first argument (got nothing instead)