Difference between revisions of "Python"

From Healthcare Robotics Wiki
Jump to: navigation, search
(efficiency)
Line 11: Line 11:
 
* matplotlib (http://matplotlib.sourceforge.net/): [http://matplotlib.sourceforge.net/users/shell.html#mpl-shell in ipython shell]
 
* matplotlib (http://matplotlib.sourceforge.net/): [http://matplotlib.sourceforge.net/users/shell.html#mpl-shell in ipython shell]
 
* mayavi (http://code.enthought.com/projects/mayavi/)
 
* mayavi (http://code.enthought.com/projects/mayavi/)
 +
 +
== opencv ==
 +
* python specific documentation: [http://opencv.willowgarage.com/wiki/PythonInterface PythonInterface], [http://opencv.willowgarage.com/wiki/SwigPythonInterface SWIG Python Interface]
  
 
== efficiency ==
 
== efficiency ==

Revision as of 12:36, 4 November 2009

learning python

math, science, numerical, etc.

opencv

efficiency

When you need buffering of some sort for logging/writing data, if speed is important use the deque() data structure instead of lists (see: http://pythonorific.org/blog/blog-2009-09-24-0109.html) This can be done by the following commands:

   from collections import deque
       buffer = deque()
       buffer.append(x) 
           #or 
       buffer.appendleft(x) #to append an item=x to the deque on one end or the other
       buffer.pop() 
           #or 
       buffer.popleft() #to pop the item from one end or the other