From: John H. <jdh...@ac...> - 2004-04-24 13:53:43
|
>>>>> "H=E9ctor" =3D=3D H=E9ctor Villafuerte D <hec...@te...= m.gt> writes: H=E9ctor> savefig("c:\\tmp\\%s_%s" % (tel,table)) File H=E9ctor> "C:\Python23\Lib\site-packages\matplotlib\matlab.py", line H=E9ctor> 1115, in savefig manager.canvas.print_figure(*args, H=E9ctor> **kwargs) File H=E9ctor> "C:\Python23\Lib\site-packages\matplotlib\backends\backend_= agg.py", H=E9ctor> line 419, in print_figure H=E9ctor> self.renderer._renderer.write_png(filename) IOError: could H=E9ctor> not open file This is a new one; I think the file is not writable and it is not a matplotlib problem per se. Is it possible that C:\\tmp does not exist? You may want to try something along the lines of import os ...snip... dirname =3D 'c:\\tmp' fname =3D os.path.join(dirname, '%s_%s' % (tel,table)) print 'dir exists', os.path.exists(dirname) print 'filename', fname file(fname, 'w').write('test\n') and see if you can see what is going wrong. JDH |