|
55 | 55 | """ |
56 | 56 | from __future__ import generators |
57 | 57 |
|
58 | | -__version__ = '0.91.1' |
| 58 | +__version__ = '0.91.2svn' |
59 | 59 | __revision__ = '$Revision$' |
60 | 60 | __date__ = '$Date$' |
61 | 61 |
|
@@ -784,60 +784,3 @@ def tk_window_focus(): |
784 | 784 | verbose.report('platform is %s'%sys.platform) |
785 | 785 | verbose.report('loaded modules: %s'%sys.modules.keys(), 'debug') |
786 | 786 |
|
787 | | -class ExampleInfo: |
788 | | - pass |
789 | | - |
790 | | -class ExampleManager: |
791 | | - baseurl = 'http://matplotlib.sf.net' |
792 | | - urls = ['%s/%s'%(baseurl, subdir) for subdir in |
793 | | - ( 'examples', 'examples/widgets')] |
794 | | - |
795 | | - def get_examples(self): |
796 | | - import urllib, re |
797 | | - rgx = re.compile('.*<A HREF="([^.]+\.py)">.*') |
798 | | - examples = [] |
799 | | - for url in urls: |
800 | | - lines = urllib.urlopen(url).readlines() |
801 | | - for line in lines: |
802 | | - m = rgx.match(line) |
803 | | - if m is not None: |
804 | | - examples.append('%s/%s'%(url, m.group(1))) |
805 | | - return examples |
806 | | - |
807 | | - def get_info(self, s): |
808 | | - """ |
809 | | - return an ExampleInfo instance from s, the string content of |
810 | | - an example |
811 | | - """ |
812 | | - pass |
813 | | - |
814 | | -class Namespace: |
815 | | - """ |
816 | | - A class which takes a list of modules and creates an object with |
817 | | - the module naems at attrs |
818 | | - """ |
819 | | - def __init__(self, namespace): |
820 | | - for k,v in namespace.items(): |
821 | | - modname = getattr(v, '__name__', None) |
822 | | - if modname is None: continue |
823 | | - if modname.startswith('matplotlib.'): |
824 | | - self.__dict__[modname.replace('matplotlib.', '')] = v |
825 | | - |
826 | | - |
827 | | -class Importer: |
828 | | - def __init__(self, modstr): |
829 | | - """ |
830 | | - import a bunch of matplotlib modules listed in modstr into a |
831 | | - single namespace. Eg, |
832 | | -
|
833 | | - mpl = Importer('artist, cbook, lines, patches') |
834 | | - print mpl.cbook.iterable(1) |
835 | | - """ |
836 | | - for name in modstr.split(','): |
837 | | - name = name.strip() |
838 | | - wholename = '.'.join(['matplotlib', name]) |
839 | | - basemod = __import__(wholename) |
840 | | - mod = getattr(basemod, name) |
841 | | - setattr(self, name, mod) |
842 | | - |
843 | | - |
0 commit comments