Search code examples
pythonspyder

Logging source code before output in Spyder console


When you run code in RStudio, it logs both the code and the output in the console (see here). Is it possible to do the same in Spyder?


Solution

  • (Spyder maintainer here) You can run cells and get their contents printed on the console by going to the menu

    Tools > Preferences > Editor > Run code
    

    and enabling the option called Copy full cell contents to the console when running code cells.