Re: [Tutor] Calling class from another class

2018-05-23 Thread Steven D'Aprano
On Tue, May 22, 2018 at 03:46:50PM +0530, aishwarya selvaraj wrote: > Dear all, > I have created 2 classes in 2 separate files. If you have learned the bad habit from Java of putting every class in a separate file, you should unlearn that habit for your Python code. There is no need to put eve

Re: [Tutor] os.walk() with multiple paths

2018-05-23 Thread Roel Schroeven
Pi schreef op 22/05/2018 21:06: import os files = [] def find_db(paths): for path in paths.split(): for root, dirs, filenames in os.walk(path): for name in filenames: if name.endswith((".db", ".sqlite", ".sqlite3")): files.append(