Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, time, os
- _File = 'TemperatureData1.csv'
- _newDir = '/home/pi/Documents/Temperature Data Logs'
- _directoryList = os.listdir(_newDir)
- os.chdir(_newDir)
- # Here I am specifying the file, that I want to write to it, and that
- # I want to use a buffer of 5kb
- output = open(_File, 'w', 5000)
- try:
- while (1):
- output.write('hin')
- time.sleep(0.01)
- except KeyboardInterrupt:
- print('Keyboard has been pressed')
- output.close()
- sys.exit(1)
Add Comment
Please, Sign In to add comment