From: Charlie M. <cw...@gm...> - 2006-03-18 01:29:33
|
I fixed the matplotlib references. I must have been importing it in my script. Thanks for the info. - Charlie On 3/17/06, Daniel McQuillen <dan...@ya...> wrote: > Daniel McQuillen <daniel@...> writes: > > > > Charlie Moad <cwmoad <at> ...> writes: > > > > > > > > I just committed the changes to cvs and added a convenience function > > > for py2exe called get_py2exe_datafiles. > > > > Charlie, > > Thanks for your help. I tried running your script and got an error origin= ating > from the function you wrote within __init__.py. I tried the function by i= tself > within PyShell and got the same error...here's the error I received: > > File "setup.py", line 23, in ? > data_files =3D [('', ['nlo.gif', '../vtkrotate/NMA.pdb']), > File "C:\Python24\Lib\site-packages\matplotlib\__init__.py", line 367, = in get_ > py2exe_datafiles > mplfiles =3D glob.glob(os.sep.join([matplotlib.get_data_path(), '*'])= ) > NameError: global name 'matplotlib' is not defined > > > This seems to be the code that you added to the __init__.py file: > > def get_py2exe_datafiles(): > import glob > > mplfiles =3D glob.glob(os.sep.join([matplotlib.get_data_path(), '*'= ])) > # Need to explicitly remove cocoa_agg files or py2exe complains > mplfiles.remove(os.sep.join([matplotlib.get_data_path(), 'Matplotli= b.nib'])) > > return ('matplotlibdata', mplfiles) > > I removed the matplotlib references and the code then worked: > > > def get_py2exe_datafiles(): > import glob > > mplfiles =3D glob.glob(os.sep.join([get_data_path(), '*'])) > # Need to explicitly remove cocoa_agg files or py2exe complains > mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) > > return ('matplotlibdata', mplfiles) > > > I can now create an .exe. I'll post soon as to how well the .exe actually= works. > > Thanks for your help. > > Daniel > Oakland, CA > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |