Look at the os.path.join() There is particularity regarding the OS you should taking in account when you want your command works everywhere...
Look in the python doc about that. Richard On Wed, Sep 7, 2011 at 3:35 PM, Richard <richard.dijks...@planet.nl> wrote: > Dear all, > > On the Mac it ran but on windows I can't get started and do not get an > plot in an applications using: > > > In Controllers/default > > def index(): > > import os > import numpy as np > import matplotlib > import matplotlib.pyplot as plt > matplotlib.use('Agg') > > x = np.arange(0, 5, 0.1); > y = np.sin(x) > plt.plot(x, y) > > outputfile = os.path.join(request.folder,'static','mp1.png') > plt.savefig(outputfile,format='png') > > > In views/default/index.html > > <p> Outfile from Matplotlib > <img src="{{=URL('static','mp1')}}" /> > </p> > > > Resulting in "None" > > I think somebody can help me. > > Thank, Richard > >