I want to search a CSV-File with python2 on the Raspberrry Pi. If the file is not found the program should generate it. How I can search a file and can decide with an if-statment if there is CSV-file or not?
Asked
Active
Viewed 46 times
-1
-
1Welcome to Stackoverflow. Did you try anything yourself? Python does have great csv support, also csv is basically a txt-file so it shouldn't be hard either way. Read also: https://stackoverflow.com/help/mcve – Bernhard Aug 08 '18 at 06:58
-
`os.path.exists('path/to/csvfile')` will return False if the specified file does nor exist. – John Anderson Aug 08 '18 at 07:01