matplotlib backend issue

using different backends for matplotlib might cause some unexpected issues: today, i am trying to run a program that uses the following function: plt.figure() figManager = plt.get_current_fig_manager() figManager.window.showMaximized() however, i found when using the backend of Tk, it gives error, saying get_current_fig_manager is not available, so when i switch to qt4egg, everything works well. how to switch the backend for matplotlib? first find the configure directory for matplotlib on your computer...

June 13, 2016 · 2 min · Shelper

python module and packaging

several things: when using setuptools.find_packages, only packages with __init__.py in its folder will be found only modules imported in the __init__.py will be indexed, means the modules will be added into the dir(module) and accessable by .module_name for python 3, if one modules(py file) in the same folder of another module and relies on that module, you need to put from . import module at the top package name is specified in the setup....

June 13, 2016 · 1 min · Shelper

ipython and pip issues

so I am trying to use ipython as my python shell under emacs, since i started using python in emacs, i always encounter different issues, again and again, so i will use this post as a collection of issues and solutions. issue1: ipython shell imports quite some packages/modules/functions and as you may know, import searches current folder as well as the subfolders of the registered module, if there are file with the same name under the current folder, it overrides the file in the registered module, apparently, this causes problems of “import error, could not find …”...

June 9, 2016 · 2 min · Shelper

design of a framework for scientific data processing

I have beening thinking of building such a framework for a while, I started a little project called pypeline. The code on github is not up-to-date. And I have some new thoughts on the framework design. So this article serves as a design documents and welcomes any comments or suggestions. Based on my own experience, I often want to process some data or image at multiple stage. Often, I want to change some parameters of certian algorithm to see how the outcomes are changed....

May 29, 2016 · 3 min · Shelper