This can be enabled in the Editor > General settings:
From the File menu open the Settings and select Editor > General. Under the Other section in the right-hand pane, check the Ensure an empty line at the end of a file on Save setting.
I'd like to do it in python. What I'd like to do in this example in c:
In C:
#include <stdio.h>
int main() {
int i;
for (i=0; i<10; i++) printf(".");
return 0;
}
Output:
..........
In Python:
>>&…
Is this the cleanest way to write a list to a file, since writelines() doesn't insert newline characters?
file.writelines(["%s\n" % item for item in list])
It seems like there would be a standard way...