On Mon, Nov 9, 2009 at 8:36 AM, Oguz Yarimtepe <[email protected]> wrote:
> > Hi, > > I was trying to use the matplotlib at my Django view. The version i was > trying is 0.98. What i did is to import the library and then plot a graph. > The problem is when i tried the "from pylab import *", i got "RuntimeError: > could not create GdkCursor object". This is most probably because of the > apache user is not able to access the X server. Indeed at my distro it > doesn't have shell account. > > I don't want to define X access to apache user. So what do you suggest? > > Don't use the pylab API from Django code. It assumes a GUI and also (if I remember correctly) is not thread-safe. You need to use the object-oriented API, as shown here for example: http://www.scipy.org/Cookbook/Matplotlib/Django Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

