$$ \newcommand{\D}{\displaystyle} \renewcommand{\eqref}[1]{Eq.~(\ref{#1})} $$

 

 

 

1.2 Check Python and LiClipse plugin

This section has the objective to verify that you have Python and the necessary Python Packages installed, and also that the Eclipse/LiClipse IDE plugin is working. Download and run the code systemCheck.py in your Eclipse/LiClipse IDE. For an illustration on how to download the Eclipse/LiClipse plugin and how to use it see this video LiClipsePlugin.mp4 LiClipsePlugin.ogg

# src-ch0/systemCheck.py

def systemCheck():
    '''
    Check for necessary moduls needed in the course tkt4140:
        matplotlib
        numpy
        scipy
        sympy

    '''
    installed = " ... installed!"
    print("")
    print("Check for necessary modules needed for the course tkt4140")
    print("")
    
    print("check for matplotlib ", end=' ')
    try:
        import matplotlib.pyplot 
        print(installed)
    except:
        print(" IMPORT ERROR; no version of matplotlib.pyplot found")
       
        
    print("check for numpy      ", end=' ')
    try:
        import numpy
        print(installed)
        
    except:
        print(" IMPORT ERROR; no version of numpy found")
    
    print("check for scipy      ", end=' ')
    try:
        import scipy
        print(installed)
    except:
        print(" IMPORT ERROR; no version of scipy found")
        

    print("check for sympy      ", end=' ')
    try:
        import sympy
        print(installed)
    except:
        print(" IMPORT ERROR; no version of sympy found")
    

if __name__ == '__main__':
    systemCheck()

1.3 Scientific computing with Python

In this course we will use the programming language Python to solve numerical problems. Students not familiar with Python are strongly recommended to work through the example Intro to scientific computing with Python before proceeding. If you are familiar with Matlab the transfer to Python should not be a problem.