[Python] Domanda riguardo errori shutil

Giovanni Vittorio Spina vittorio.spina a gmail.com
Sab 30 Giu 2012 15:57:41 CEST


Perchè si ferma al primo errore, dovresti segnarti i files copiati e quelli che non è riuscito a copiare ripetere la copia finchè non hai ciclato tutti i files presenti e poi riportare la lista di quelli bloccanti

Giovanni Vittorio Spina
R&D dept. Manager
  -  
EERobotics, Engineering Electronics and Robotics s.r.l.
( a Team Italia group company )
via della Giustizia 10, 60132 Fano (PU)
p.ta iva e cod. fisc. 03238690410

Web: http://www.eerobotics.it
General mail: info a eerobotics.it
Office: +39 (0) 586 42 64 89
Fax: +39 (0) 586 44 59 91
Mobile: +39 380 15 10 409

... from iPad

The information contained in this e-mail, and any  files transmitted with it, is confidential and may be legally privileged. It is intended solely for the adresses. If you are not in the intended recipient, please return the message by replying to it and then delete the message from your computer. Any disclosure copying, distribution, or action taken in reliance on its contents is prohibited and may be unlawful.

Il giorno 30/giu/2012, alle ore 15:30, Massimo Capanni <massimo.capanni a gmail.com> ha scritto:

> grazie, funziona anche se non mi fornisce tutti i file che non è riuscito a copiare ma solo una parte.
> Quello che ho postato è solo un frammento dello script, se vuoi ti posso passare l'intero sorgente.
> 
> massimo
> 
> Il giorno 30 giugno 2012 09:06, Marco Mariani <birbag a gmail.com> ha scritto:
> 2012/6/30 Massimo Capanni <massimo.capanni a gmail.com>
>  
>                 except shutil.Error:
>                     print "Non posso copiare la cartella: ", lista_cartelle[i]
>                     sys.exit()
> 
> 
> except shutil.Error as exc:
> 
> 
> poi exc dovrebbe contenere cio' di cui hai bisogno
> ma esattamente come replico la tua situazione, ad esempio su linux?
> 
> 
> 
> _______________________________________________
> Python mailing list
> Python a lists.python.it
> http://lists.python.it/mailman/listinfo/python
> 
> 
> _______________________________________________
> Python mailing list
> Python a lists.python.it
> http://lists.python.it/mailman/listinfo/python
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.python.it/pipermail/python/attachments/20120630/1a31fd67/attachment.html>


Maggiori informazioni sulla lista Python