0

I'm using the Geany editor on a raspberry pi to write a simple program using pi3d

I had a program running, made some changes and now it crashes.

My problem is that when I run the program from Geany, a window opens, an error is printed but before I can read it the screen is cleared and a standard error message is displayed:

    --------------------------
    (program exited with code: 1)
    Press return to continue

I've tried running the code directly from the terminal, but the same thing happens. I can't scroll up to see the error or anything, it's not visible anywhere.

Is there a way I can get it to either write this to disk, or pause when there's an error so that I can actually read it?

user1111284
  • 886
  • 1
  • 6
  • 23
  • This is not Python or Geany specific error, [see this topic](http://stackoverflow.com/questions/9426045/difference-between-exit0-and-exit1-in-python). – Sidon Apr 30 '17 at 21:52
  • 1
    Have you tried redirect stderr to a file, like this `python your_program.py 1>&2 2>error`? Also in console you can scroll up/down by SHIFT+PageUP/PageDOWN – rth Apr 30 '17 at 21:59

1 Answers1

0

The suggestion from @rth sorts it - redirecting the output directly to a file from the shell

user1111284
  • 886
  • 1
  • 6
  • 23