2
$\begingroup$

When I press "run script" with a python script in the Text Editor, it runs, but seems to spawn some new invisible python interpreter. I'd like it to run in the Python Console that I already have open. Is there a way to do this?

As it stands now, I'm copying and pasting from the Editor to the Console, which sure is tedious.

$\endgroup$
  • $\begingroup$ blenderartists.org/forum/… There may be some more recent versions, and IIRC @zeffii has something similar too. $\endgroup$ – batFINGER Apr 11 '16 at 14:41
  • $\begingroup$ Another addon. Note, that the blender python console uses InteractiveConsole. You might have a look at scripts/modules/console_python.py. $\endgroup$ – pink vertex Apr 12 '16 at 8:46
2
$\begingroup$

In the text editor, make sure that the code you want to run is callable (f.e. make it a function). Name the text datablock something.py). Now you can use import something in the console, and call something.yourfunc() on it.

$\endgroup$
-2
$\begingroup$

In Blender go to Window and select toggle system console. Do this after "run script"

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.