tags:

views:

41

answers:

1

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
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
yes, exactly. You might try experimenting with it to see how it behaves for your application.
Ned Batchelder
"try experimenting". Good suggestion.
S.Lott