Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文字列のリストがあり、プログラムを停止するだけでなく、 eval() を使用するときに、これらの子プログラムのいずれかが Python インタープリターで正常にコンパイルされたかどうかを親プログラムが判断する方法があると考えました。スクリプトを停止せずに伝える方法があれば、それは大きな助けになります...
You may find the "compile" function useful:
http://docs.python.org/2/library/functions.html#compile