7
$\begingroup$

Is it possible to get access to the blender interactive python shell from a terminal? I know I can start a python script with the the following command

blender --background --python script.py

But what i want is to get the actual shell that i can type in the terminal something like

>>> bpy.ops.active_object.mode
'OBJECT'

and get the result immediatly like in the normal python interactive shell

$\endgroup$
2
  • $\begingroup$ oh, i can do that with --python-console. I haven't seen that $\endgroup$ Commented Aug 6, 2014 at 11:26
  • 1
    $\begingroup$ Feel free to add that as an answer :) $\endgroup$
    – gandalf3
    Commented Oct 6, 2014 at 8:07

2 Answers 2

9
$\begingroup$

The solution is to start blender with --python-console, see the user manual for Python command line args.

$\endgroup$
2
0
$\begingroup$

Blender has a python console built-in, you can change any section of the blender layout to a console.

enter image description here

You can also find an addon here that lets you execute a text block in the python console.

$\endgroup$
1
  • $\begingroup$ interesting add on that you linked in your answer, but overall this answer does not fit to my question. The solution is to start blender with --python-console. $\endgroup$ Commented Aug 7, 2014 at 12:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .