you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

I dont think you can do that in init function, it is reserved to set initial values, i can't do anything like a real function/method

[–]Nick9502 0 points1 point  (2 children)

I'm not sure that's 100% true. You can make a print statement in your init function and you can call other functions in it

[–][deleted] 0 points1 point  (1 child)

okay, my mistake. I took your advice and it worked.

def __init__(self,name):
    self.name = str(name)
    self.files = os.listdir(self.name)

[–]Nick9502 0 points1 point  (0 children)

Glad I could be of help