PyCharm show graphics
Question: I am trying to have PyCharm show my graphics, but when I run this script
nothing appears on the screen.

    
    
    from pylab import *
    
    def main():
        ion()
        t = arange(0.0, 2.0, 0.01)
        s = sin(2*pi*t)
        plot(t, s)
    
        xlabel('time (s)')
        ylabel('voltage (mV)')
        title('About as simple as it gets, folks')
        grid(True)    
        show()
    

I am using Python 2.7.6, Pycharm 3.4 and Windows 7 x64.

* * *
    
    
    D:\Python27\python.exe "D:/sletmig/python tests/pandas/chart.py"
    
    Process finished with exit code 0
    

* * *

I am new to Python!


Answer: add this to the end of script:

    
    
    if __name__ == "__main__":
        main()
    

