Steve,

I am aware of the caveats associated with the "name" attribute, which  
is why the code I sent you attempts to do the right thing when it  
doesn't exist.  I hadn't considered the case of stdout, but you could  
probably detect situations like that by testing to see if the  
extension is the empty string:

>       # figure out what the format is
>       if extension is None or extension == '':
>               ...

However, this variety of special case handling could make things more  
confusing for beginning users.  I think ultimately you should do  
whatever you think strikes the best balance between convenience and  
clarity.

On Jul 21, 2006, at 7:27 PM, Steven Chaplin wrote:
>
> I think an explicit 'format' argument is better than reading a 'name'
> attribute which only works sometimes.

In general I tend to agree with you, but I'd like to see Just Work  
when writing to an open file.  I don't have a lot of stake in this  
either way, since I spend most of my time with matplotlib pushing the  
RGB data onto wxPython widgets.

Ken

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to