Skip to content Skip to sidebar Skip to footer

Pycharm : How-to Launch For A Standard Terminal (to Solve An Issue With Curses)

I'm facing a weird problem. Using Pycharm (please do not troll about this fact), I'm trying to launch a short app that uses ncurses to render some things on my term. While I can la

Solution 1:

I solved the curses debugging problem by attaching the debugger to a process.

  • Start the program in a terminal
  • Pycharm -> Tools -> Attach to Process
  • Select my prog
  • Done

Trying to attach as non-root requires additional ptrace access rights.

Explained here: http://blog.mellenthin.de/archives/2010/10/18/gdb-attach-fails-with-ptrace-operation-not-permitted/#comment-141535

On my ubuntu machine: echo 0 > /proc/sys/kernel/yama/ptrace_scope (as root)

respectively set ptrace_scope to 0 in /etc/sysctl.d/10-ptrace.conf

Solution 2:

  • Start PyCharm and make sure that ncurses is listed in File->Settings->Project Interpreter->Python Interpreter;
  • if you have 2.7 and 3.x interpreters installed, make sure that correct one(supporting ncurses) is selected as default for the project from which you launch your application;

I more than sure that you have both 2.7 and 3.x installed on your machine - I had most of the issues with pycharm for case where both Python's branch were installed.

Post a Comment for "Pycharm : How-to Launch For A Standard Terminal (to Solve An Issue With Curses)"