For the first entry of my programming activities record , I will start by posting my current script template. I plan on periodically updating this as I learn more about Python, but I guessing it won’t change much from this format. Maybe I should put it on a page instead of post.
_____________template.py_______________
#!/usr/bin/env python
# -*- coding: utf-8 -*-
“””
Created on %(date)s
@author: Ripley6811
@abstract:
@input: none
@output: none
@acknowledgments:
“””
#from numpy import * #imports ndarray(), arange(), zeros(), ones(), and other array methods
#from visual import * #imports NumPy.*, SciPy.*, and Visual objects (sphere, box, etc.)
#import matplotlib.pyplot as plot #use plot(x,y) and show() for plotting
#from pylab import * #imports NumPy.*, SciPy.*, and matplotlib.*
def main():
“””Description of main()”””
if __name__ == ‘__main__’:
main()
”’######################################
linspace(0,2,9) > array of 9 numbers from 0 to 2
zeros( (10,10,10) ) > a 3-d array of 0.0 (pass a list)
ones( (3,4,5) ) > a 3-d array of 1.0’s
”’######################################