Skip to content

Commit 222426d

Browse files
committed
[IMP] developer: added "--shell-file" CLI option
Added the description for the new '--shell-file' option, which overrides the the $PYTHONSTARTUP env variable to initialize the shell session with a startup Python script. Related docs: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONSTARTUP Community PR: odoo/odoo#185075 task-4306704
1 parent 112551a commit 222426d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

content/developer/reference/cli.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,16 @@ interaction with the :ref:`orm <reference/orm>` and its functionalities.
695695
By default, the shell is running in transaction mode. This means that any change made to the
696696
database is rolled back when exiting the shell. To commit changes, use `env.cr.commit()`.
697697

698+
699+
.. option:: --shell-file <init_script.py>
700+
701+
Specify a Python script to be run after the start of the shell. Overrides the environment
702+
variable `PYTHONSTARTUP`.
703+
698704
.. option:: --shell-interface (ipython|ptpython|bpython|python)
699705

700-
Specify a preferred REPL to use in shell mode. This shell is started with the `env` variable
701-
already initialized to be able to access the ORM and other Odoo modules.
706+
Specify a preferred `REPL` to use in shell mode. This shell is started with the `env` variable
707+
already initialized to be able to access the `ORM` and other Odoo modules.
702708

703709
.. seealso::
704710
:ref:`reference/orm/environment`

0 commit comments

Comments
 (0)