Other articles


  1. raw_input in matplotlib with plot interaction

    When working with data, you sometimes need to view the data and give input on how to continue. However, a simple
    plot([1,2],[1,2])
    answer = raw_input()
    
    will not work: the plot GUI will block while the raw_input() is waiting. The following is a (admittedly hacky) solution to this problem: run raw_input() in a seperate thread, and poll the GUI using waitforbuttonpress(): read more