RE: for loop iter next if file bad

2016-12-21 Thread Joaquin Alzola
>def return_files(file_list): >""" >Take a list of files and return file when called. > >Calling function to supply attributes >""" >for file in file_list: >with open(os.path.join(dir_path, file), 'rb') as fd: >if os.stat(fd.name).st_size == 0: >

Re: for loop iter next if file bad

2016-12-21 Thread Sayth Renshaw
Ah yes. Thanks ChrisA http://www.tutorialspoint.com/python/python_loop_control.htm The continue Statement: The continue statement in Python returns the control to the beginning of the while loop. The continue statement rejects all the remaining statements in the current iteration of the loop an

Re: for loop iter next if file bad

2016-12-21 Thread Chris Angelico
On Wed, Dec 21, 2016 at 8:47 PM, Sayth Renshaw wrote: > def return_files(file_list): > """ > Take a list of files and return file when called. > > Calling function to supply attributes > """ > for file in file_list: > with open(os.path.join(dir_path, file), 'rb') as fd: