Tutorial: Enabling Console - BLCM/BLCMods GitHub Wiki
There have been various methods of enabling the console for BL2/TPS throughout the years, and this page had historically tried to keep track of all that info. Instead, with the release of OpenBLCMM in May 2023, we've cleaned up this page to just list the single currently-recommended way of enabling your in-game console (and text mod functionality), which is PythonSDK.
Installing PythonSDK is the recommended method of enabling mods even if you're only planning on running text-based mods. No hex edits are required -- just install PythonSDK and you'll be good to go. That is all!