Thanks jacob, will need a few days to recover from this defeat
then I´ll post some files for testing.
The problem with the Dynamo nodes: If there is any error in the graph and the write node gets a null or an empty list it erases my whole log! Happend a few times now so i live in fear until i solved that problem^^
Finally made it!
Found the solution on stack. The writer iterates over every single character, so the string must be “wrapped to a list” with writer.writerow([Line]).
python - Why does csvwriter.writerow() put a comma after each character? - Stack Overflow
read:
import io
filePath = IN[0]
with io.open(filePath, "r", encoding="UTF8") as file:
string = file.read().splitlines()
OUT = string
write:
import io
import csv
filePath = IN[0]
NewLog = IN[1]
with io.open(filePath,"w", encoding="UTF8", newline='') as file:
for Line in NewLog:
writer = csv.writer(file,delimiter="'")
writer.writerow([Line])