python - Executing a script within a script but continuing on error(s) and saving them to file -


if have following bit of code:

try:      execfile("script.py") except ## unsure exception goes here...     continue: try:      execfile("other.py") except ## unsure exception goes here...     continue: 

how catch errors script.py save file , continue onto next called script

anyone have ideas or clues?

errors = open('errors.txt', 'w') try:      execfile("script.py") except exception e:     errors.write(e) try:      execfile("other.py") except exception e:      errors.write(e) errors.close() 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -