It looks like import to console is no longer supported by blender.

Importdoesn'twork

  • Dwayne Savage(dillenbata3) replied

    Do you mean the import command? make sure you do it in all lowercase.

  • Glenn Lewis(gmlewis) replied

    Now, in Blender 4.02, this seems to work in the console:

    m = D.texts['rename.py'].as_module()
    m.rename_selected('New Name')