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: ============================================ Check if an txt file is empty or not: code: ============================================ Check if an txt file is empty or not: code: ============================================ Read its first character in a text file: code: ============================================ Check if the image is empty or not (check if an image can be found or not): code:
|
||||||||
================================================================================= | ||||||||
|
||||||||