def get_py2exe_datafiles():
datapath = get_data_path()
head, tail = os.path.split(datapath)
d = {}
for root, dirs, files in os.walk(datapath):
# Need to explicitly remove cocoa_agg files or py2exe complains
# NOTE I dont know why, but do as previous version
if 'Matplotlib.nib' in files:
files.remove('Matplotlib.nil')
files = [os.path.join(root, filename) for filename in files]
root = root.replace(tail, 'matplotlibdata')
root = root[root.index('matplotlibdata'):]
d[root] = files
return d.items()
----------------------------- end ---------------------------------
Thanks for the patch to matplotlib/__init__.py. I changed an obvious
issue ('.nil' to '.nib'), but otherwise committed it as-is. Can you (or
Werner, who was also having this issue) test the current svn version
(>=3418) and report back?
Cheers!
Andrew
tocer wrote:
···
Hi, matplotlib developer
You know there is a bug about get_py2exe_datafiles in MPL0.90.1. I
think I fix it below.
def get_py2exe_datafiles(): datapath = get_data_path() head, tail =
os.path.split(datapath) d = {} for root, dirs, files in
os.walk(datapath): # Need to explicitly remove cocoa_agg files or
py2exe complains # NOTE I dont know why, but do as previous version if 'Matplotlib.nib' in files: files.remove('Matplotlib.nil') files =
[os.path.join(root, filename) for filename in files] root =
root.replace(tail, 'matplotlibdata') root =
root[root.index('matplotlibdata'):] d[root] = files return d.items()
----------------------------- end ---------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express Download DB2 Express C
- the FREE version of DB2 express and take control of your XML. No
limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/