Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-11-05 11:08:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-05 11:08:17 +0300
commit41e267b4b46ea49a7f9ae7d92fa273813f00e324 (patch)
treef0796492ba905878c0224e6fa34fec61e15703a4 /doc
parent534c0af4d39f692c1ee3eb7116c2b5fe909bc134 (diff)
API Docs: use importlib in examples
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/info_tips_and_tricks.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index 28d129b5b13..82625268b63 100644
--- a/doc/python_api/rst/info_tips_and_tricks.rst
+++ b/doc/python_api/rst/info_tips_and_tricks.rst
@@ -114,9 +114,9 @@ This example shows loading a script in as a module and executing a module functi
.. code-block:: python
import myscript
- import imp
+ import importlib
- imp.reload(myscript)
+ importlib.reload(myscript)
myscript.main()
@@ -143,8 +143,8 @@ this example adds the current blend files directory to the search path, then loa
sys.path.append(blend_dir)
import myscript
- import imp
- imp.reload(myscript)
+ import importlib
+ importlib.reload(myscript)
myscript.main()
@@ -307,7 +307,7 @@ Since it's possible to access data which has been removed (see Gotcha's),
this can be hard to track down the cause of crashes.
To raise Python exceptions on accessing freed data (rather than crashing),
-enable the CMake build option WITH_PYTHON_SAFETY.
+enable the CMake build option ``WITH_PYTHON_SAFETY``.
This enables data tracking which makes data access about 2x slower
which is why the option isn't enabled in release builds.