I just switched from Sublime Text to Atom and find it so far great. I have run into an inconvenience, though.
Here is a print screen of a piece of code. As we can see I have a problem in the coloring of the 8th line, where the editor doesn’t consider the string passed to the query variable as a string, or I don’t know what happens, the thing is it considers the rest of the script as a text or at least show it that way:
Aside from the styling, the script runs just fine, so there is nothing wrong with it.
For testing purposes, in case, here is the script:
with open(liste, newline='') as f: donnees = csv.reader(f, delimiter = ";") liste = list(donnees) #liste = [sublist for sublist in liste] for line in liste[1:]: if len(line) >= 3 and line in ('01071','01078') : print(line) query = "INSERT INTO ipe VALUES (" for data in line: data = data.replace("'","''") data = data.replace(',', '.') if data == '': data = 'null' query = query + data + ", " else : query = query + "'" + data + "'" + ", " query = query[:-2] + ");\n" cmd_insert = cmd_insert + query cmd_insert = "TRUNCATE TABLE ipe;" + cmd_insert