Problem description
I've got a simple script in Text Editor
And want to get the function defined in it be able to execute from Python Console.
Old Blender Cookie tutorial says that all I have to do is write in console:
>>> from rename import BatchRename
>>> BatchRename('Monkey')
But I've got a Traceback message
I looked through a lot of artitcles but only this one was helpfull.
And the only way I could refer to this script from console and execute the BatchRename function was
>>> filepath = bpy.path.abspath("//rename.py")
>>> exec(compile(open(filepath).read(), filepath, 'exec'))
Questions
Why the first script doesn't work?
What is the best working method to refer to Script from the Text Editor From Python Console?
BatchRename
module. you can install it withpip package manager
. but i don't know what the corresponding package name is that includes the module batchrename. let me know what it is and i can continue teach how to run your script. $\endgroup$