|
10.
|
|
|
``in``
|
|
|
|
``in``
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:46
|
|
11.
|
|
|
The ``in`` modifier takes a name. Instead of executing in the default store, the python code will execute in the store that name.
|
|
|
|
The ``in`` modifier takes a name. Instead of executing in the default store, the python code will execute in the store that name.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:48
|
|
12.
|
|
|
One-line Python Statement
|
|
|
|
One-line Python Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:54
|
|
13.
|
|
|
A common case is to have a single line of python that runs in the default store. For example, a python one-liner can be used to initialize or update a flag. To make writing python one-liners more convenient, there is the one-line python statement.
|
|
|
|
A common case is to have a single line of python that runs in the default store. For example, a python one-liner can be used to initialise or update a flag. To make writing python one-liners more convenient, there is the one-line python statement.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:56
|
|
14.
|
|
|
The one-line python statement begins with the dollar-sign ($) character, and contains all of the code on that line. Here are some example of python one-liners::
|
|
|
|
The one-line python statement begins with the dollar-sign ($) character, and contains all of the code on that line. Here are some example of python one-liners::
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:61
|
|
15.
|
|
|
Python one-liners always run in the default store.
|
|
|
|
Python one-liners always run in the default store.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:77
|
|
16.
|
|
|
Init Python Statement
|
|
|
|
Init Python Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:83
|
|
17.
|
|
|
The ``init python`` statement runs python code at initialization time, before the game loads. Among other things, this code can be used to define classes and functions, or to initialize styles, config variables, or persistent data. ::
|
|
|
|
The ``init python`` statement runs python code at initialization time, before the game loads. Among other things, this code can be used to define classes and functions, or to initialise styles, config variables, or persistent data. ::
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:85
|
|
18.
|
|
|
A priority number can be placed between ``init`` and ``python``. When a priority is not given, 0 is used. Init statements are run in priority order, from lowest to highest. Init statements of the same priority are run in unicode order by filename, and then from top to bottom within a file.
|
|
|
|
A priority number can be placed between ``init`` and ``python``. When a priority is not given, 0 is used. Init statements are run in priority order, from lowest to highest. Init statements of the same priority are run in unicode order by filename, and then from top to bottom within a file.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:105
|
|
19.
|
|
|
To avoid conflict with Ren'Py, creators should use priorities in the range -999 to 999. Priorities of less than 0 are generally used for libraries and to set up themes. Normal init code should have a priority of 0 or higher.
|
|
|
|
To avoid conflict with Ren'Py, creators should use priorities in the range -999 to 999. Priorities of less than 0 are generally used for libraries and to set up themes. Normal init code should have a priority of 0 or higher.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/python.rst:110
|