Open liavkoren opened 6 years ago
Also, the save
builtin does seem to be completely reliable.
O. I guess we're supposed to use createWriter
?
I'm not sure where the current working directory is at processing runtime. That's where your files are likely to be.
This seems super duper weird, I know, but multiple variants of using
file.write()
seem to randomly and frequently fail for me. I've tried bothwith open('foo_test_file', 'w') as file:
andfile = open('foo_test_file', 'w')
, and with calls both insidesetup
anddraw
, as well as verified that small test files that should have been written to disk can still be opened and have their contents read, even when they don't appear on disk.Might this be a buffer in Java or Jython that needs to be flushed to disk?
One example:
I've run this sketch multiple times and did
ls
for the directory after each time, saw nothing, also used the Processing 'Show Sketch Folder' thing to double check.system info:
OS X 10.12.5 PyMode 3037 P5 v3.3.7 app path: /Applications/Processing.app sketch path: /Users/liavkoren/Processing