diff -r c7638be1e430 Doc/extending/embedding.rst --- a/Doc/extending/embedding.rst Thu Dec 08 00:33:14 2011 +0100 +++ b/Doc/extending/embedding.rst Thu Dec 08 18:20:30 2011 -0800 @@ -110,6 +110,13 @@ routine that you call between both data conversions. When extending, you call a C routine, when embedding, you call a Python routine. +Other than that, one subtle issue that you usually need to pay close attention +to is the module loading path (``sys.path``) when you embed Python into your +application. An unexpected path could lead to insecure module loading and code +execution. It is best to call ``PySys_SetPath`` prior to ``Py_Initialize`` to +specify fixed directories from which all modules (including ``site``) are +imported later. + This chapter will not discuss how to convert data from Python to C and vice versa. Also, proper use of references and dealing with errors is assumed to be understood. Since these aspects do not differ from extending the interpreter,