On Tue, Feb 28, 2012 at 12:20 AM, Tony Yu <tsyu80@gmail.com> wrote:


2012/2/26 Stéfan van der Walt <stefan@sun.ac.za>
On Sun, Feb 26, 2012 at 12:25 PM, Christoph Gohlke <cjgohlke@gmail.com> wrote:
> Instead of restoring the default plugins after each test module, maybe it
> would be better/cleaner/safer for the tests to never change the default
> plugins but to just load the plugin and explicitly specify the plugin in
> each imread, imwrite, etc. function call? It seems there is currently no way
> to load a plugin without making it the default. This could be achieved by
> changing the use_plugin function to accept another option for the `kind`
> parameter, e.g. an empty string, signaling that the plugin should only be
> loaded. Probably too late for the 0.5 release.

Ideally, the ``imread(..., plugin='fits')`` functionality should
auto-load the FITS-plugin---I should see why this is not currently
working, because it seems like a bug.

Stéfan

I just submitted PR #157 to address an error raised with non-loaded plugins. I'm not sure if this addresses the issue you mention above, but it's related, at least.

-Tony

Hmm, another issue: Using ``imshow(..., plugin='qt')`` doesn't behave correctly (even after the PR above) because the ``show()`` function still uses the default plugin (i.e. not necessarily the qt plugin), so the window opened by ``imshow`` just disappears.

I don't have time to look at the code right now, but this seems like a more difficult issue to solve.

-Tony