Re: [Matplotlib-users] Storing matplotlib figure's image data straightway to SQL Server

2009-12-19 Thread Panagiotis Kontaxis
Thank you very much for your answer! I post the full solution to anyone else maybe need it: try: conn = psycopg2.connect("dbname='...' user='...' host='127.0.0.1' password=''"); except: print "I am unable to connect to the database" curs = conn.cursor() code to create i

Re: [Matplotlib-users] Storing matplotlib figure's image data straightway to SQL Server

2009-12-19 Thread Jae-Joon Lee
On Fri, Dec 18, 2009 at 3:06 AM, Panagiotis Kontaxis wrote: > I found only the figure.savefig() function that saves figure's image only as > a filename in the filesystem and not in a local variable. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.savefig savefig can take

[Matplotlib-users] Storing matplotlib figure's image data straightway to SQL Server

2009-12-18 Thread Panagiotis Kontaxis
Hello matplotlib users! I 'm using matplotlib for one week and I 'm excited. The only thing I couldn't do is to save image's contect straightway to SQL server. So I 'm searching for a function that store figure's image as binary data in a python variable in order to put the content of this variabl