source: trunk/coopr/opt/__init__.py @ 1761

Last change on this file since 1761 was 1761, checked in by wehart, 11 years ago

Moving the plugin imports to the end of the package init.py files.
My work with PyUtilib? has highlighted the fact that putting these
first causes an error.

File size: 960 bytes
Line 
1#  _________________________________________________________________________
2#
3#  Coopr: A COmmon Optimization Python Repository
4#  Copyright (c) 2008 Sandia Corporation.
5#  This software is distributed under the BSD License.
6#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7#  the U.S. Government retains certain rights in this software.
8#  For more information, see the Coopr README.txt file.
9#  _________________________________________________________________________
10
11import pyutilib.plugin
12
13pyutilib.plugin.PluginGlobals.push_env( 'coopr.opt' )
14
15from base import *
16from colin import *
17import solver
18import reader
19from parallel import *
20
21pyutilib.plugin.PluginGlobals.pop_env()
22
23
24try:
25    import pkg_resources
26    #
27    # Load modules associated with Plugins that are defined in
28    # EGG files.
29    #
30    for entrypoint in pkg_resources.iter_entry_points('coopr.opt'):
31        plugin_class = entrypoint.load()
32except:
33    pass
34
Note: See TracBrowser for help on using the repository browser.