Outils pour utilisateurs

Outils du site


issue55:tutopython

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
issue55:tutopython [2012/01/29 18:28] andre_domenechissue55:tutopython [2012/01/30 21:50] (Version actuelle) fredphil91
Ligne 149: Ligne 149:
 **We check to see if there is either “');” or “'),” in our line. In the case of “');”, this would be the last line in our insert statement set. **We check to see if there is either “');” or “'),” in our line. In the case of “');”, this would be the last line in our insert statement set.
  
-posx = line.find("');"+  posx = line.find("');"
-pos1 = line.find("'),"+  pos1 = line.find("'),"
-l1 = line[:pos1]+  l1 = line[:pos1]
  
 This line checks for escaped single quotes and replaces them. This line checks for escaped single quotes and replaces them.
  
-line = line.replace("\\'","''")+  line = line.replace("\\'","' '")
  
 If we have a closing statement (“);”), that is the end of our insert set, and we can create the statement by joining the prelude to the actual value statement. This is shown on the previous page, bottom right. If we have a closing statement (“);”), that is the end of our insert set, and we can create the statement by joining the prelude to the actual value statement. This is shown on the previous page, bottom right.
Ligne 199: Ligne 199:
 Ce code devrait fonctionner tel quel dans plus de 90 % des cas. Nous pourrions avoir oublié certaines choses à cause d'autres problèmes, c'est pour cela qu'un mode Debug est prévu. Cependant, j'ai testé cela sur plusieurs fichiers et n'ai eu aucun problème. Ce code devrait fonctionner tel quel dans plus de 90 % des cas. Nous pourrions avoir oublié certaines choses à cause d'autres problèmes, c'est pour cela qu'un mode Debug est prévu. Cependant, j'ai testé cela sur plusieurs fichiers et n'ai eu aucun problème.
  
-Comme toujours, le code est disponible sur Pastebin : http://pastebin.com/9qeAUcxX.+Comme toujours, le code est disponible sur Pastebin : http://pastebin.com/Bdt64VqS.
  
 À la prochaine fois. À la prochaine fois.
  
issue55/tutopython.1327858086.txt.gz · Dernière modification : 2012/01/29 18:28 de andre_domenech