Electron microscopy
 
Check whether a File is Empty or Not
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

============================================

A few ways:
         i) os.stat() function
         ii) os.path.getsize() function
         iii) By reading the first character
         iv) Using regex module
         v) Check file existence

============================================

Check if an txt file is empty or not: code:          
          List all immediate subfolders
Output:         
         List all immediate subfolders

============================================

Check if an txt file is empty or not: code:          
          List all immediate subfolders
Output:         
         List all immediate subfolders

============================================

Read its first character in a text file: code:          
          List all immediate subfolders
Input A:         
         List all immediate subfolders
Output A:         
         List all immediate subfolders
Input B:         
         List all immediate subfolders
Output B:         
         List all immediate subfolders

============================================

Check if the image is empty or not (check if an image can be found or not): code:          
          List all immediate subfolders
Output:         
         List all immediate subfolders


         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 

 

 

 

 

 

=================================================================================