/[escript]/trunk/doc/examples/cookbook/cblib.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/cblib.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2647 by ahallam, Thu Sep 3 02:20:33 2009 UTC revision 2648 by jfenwick, Mon Sep 7 00:06:15 2009 UTC
# Line 75  def toXYTuple(coords): Line 75  def toXYTuple(coords):
75      coords = np.array(coords.toListOfTuples()) #convert to Tuple      coords = np.array(coords.toListOfTuples()) #convert to Tuple
76      coordX = coords[:,0]; coordY = coords[:,1] #X and Y components.      coordX = coords[:,0]; coordY = coords[:,1] #X and Y components.
77      return coordX,coordY      return coordX,coordY
78    
79    
80    import os
81    def needdirs(dirlist):
82        for name in dirlist:
83        if name == '':
84            continue
85        if not os.path.exists(name):
86               try:
87            os.makedirs(name)
88               except OSError:
89            if not os.path.exists(save_path):
90                raise

Legend:
Removed from v.2647  
changed lines
  Added in v.2648

  ViewVC Help
Powered by ViewVC 1.1.26