#acl AdminGroup:read,write,delete,revert EditorGroup:read,write,delete,revert All:read #format wiki #language en #pragma section-numbers off <> = Basic Python = * Allowed names for identifier * Assignments, e.g. {{{a=1}}}, {{{a,b=1,2}}}, {{{a+=1}}} * Comparisons, e.g. {{{==}}}, {{{!=}}} * Lists and their methods, e.g. {{{L.append()}}} * Strings and their methods, e.g. {{{.replace()}}}, {{{.split()}}}, * Dictionaries and their methods, e.g. {{{D.keys()}}} * Indexing and slicing, e.g. {{{L[-2:]}}} * Loops, e.g. {{{for i,j in enumerate(['Hund','Katze','Maus']):}}} * Control statements, e.g. {{{if}}} * Importing modules, e.g. {{{import scipy}}} * Getting help, e.g. {{{help()}}} * Defining functions, e.g. {{{def function(x,y):}}} * Working with files, e.g. {{{fid=open(filename,'r')}}} = Standard modules = * System, e.g. {{{sys.argv}}} * OS, e.g. {{{os.system()}}} * File globbing, e.g. {{{glob.glob('*.txt')}}} = scipy, numpy, pylab = * Array creation, e.g. {{{zeros()}}}, {{{array()}}}, {{{linspace()}}} * Array methods, e.g. {{{.shape()}}}, {{{.reshape()}}}, {{{.tofile()}}}, {{{.flat()}}}, {{{.transpose()}}} * Plotting, e.g. {{{plot()}}}, {{{contour()}}} * Netcdf, e.g. {{{fid=scipy.io.netcdf_file(filename,'r')}}}, {{{fid.variables}}}