does the file which is sent as an argument to execfile runs as an independent process / thread or is the code imported and then executed ? . Also i wanted to know how efficient is it compared to running threads / process .
+2
A:
The file is not run in a separate thread or process, it runs synchronously with the caller.
Ned Batchelder
2010-10-27 13:23:00
well can u elaborate a bit on that . Is it that the code in the file is imported via execfile() and after execution the the next instruction in the parent file is executed ?
Rahul
2010-10-27 13:28:25
yes, exactly. You might try experimenting with it to see how it behaves for your application.
Ned Batchelder
2010-10-27 13:33:11
"try experimenting". Good suggestion.
S.Lott
2010-10-27 14:09:11