Ñò \ÐKc@s¼dZgZddkZeidƒddkZddkZddkZd„Zd„Zd„Z d„Z ei i d„Z d „Zei i d „Zed joe eiƒndS( s` This module converts code written for numpy.numarray to work with numpy FIXME: finish this. iÿÿÿÿNs.numpy.numarray.alter_code2 is not working yet.cCs*t|dƒ}|i|ƒ|iƒdS(Ntw(tfiletwritetclose(tnametfilestrtfid((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt makenewfiles cCsOt|ƒ}|iƒ}|iƒtii|ƒ\}}t|d|ƒ|S(Ns.orig(RtreadRtostpathtsplitextR(RRRtbasetext((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt getandcopys    cCs)t|ƒ}t|ƒ}t||ƒdS(sŸConvert the filename given from using Numeric to using NumPy Copies the file to filename.orig and then over-writes the file with the updated code N(RtfromstrR(tfilenameR((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt convertfiles  cCs|d}t|ƒdS(Ni(R(targsR((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pytfromargs)s cCs=titii|dƒƒ}x|D]}t|ƒq%WdS(sòConvert all .py files to use NumPy (from Numeric) in the directory given For each file, a backup of .py is made as .py.orig. A new file named .py is then written with the updated code. s*.pyN(tglobR R tjoinR(tdirectfilestafile((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt convertall-scCst|ƒdS(N(R(targtdirnametfnames((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt_func8scCstii|tdƒdS(s-Convert all .py files in the tree given N(R R twalkRtNone(R((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyt converttree;st__main__(t__doc__t__all__twarningstwarntsysR RRRRRR tcurdirRRR t__name__targv(((s@/usr/lib64/python2.6/site-packages/numpy/numarray/alter_code2.pyts