4
import scipy.optimize as sopt
5
import scipy.optimize.linesearch as linesearch
8
import glob, re, time, sys
13
if sys.version[:5] < '2.4.0':
14
def sorted( sequence ):
15
tmp = copy( sequence )
20
# Some usefull definitions.
24
class Struct( object ):
27
def __init__( self, **kwargs ):
29
self.__dict__.update( kwargs )
33
ss = "%s\n" % self.__class__
34
for key, val in self.__dict__.iteritems():
35
if (issubclass( self.__dict__[key].__class__, Struct )):
36
ss += " %s:\n %s\n" % (key, self.__dict__[key].__class__)
38
aux = "\n" + str( val )
39
aux = aux.replace( "\n", "\n " );
40
ss += " %s:\n%s\n" % (key, aux[1:])
45
ss = "%s\n" % self.__class__
46
for key, val in self.__dict__.iteritems():
47
if (issubclass( self.__dict__[key].__class__, Struct )):
49
aux = "\n" + self.__dict__[key].strAll()
50
aux = aux.replace( "\n", "\n " );
53
aux = "\n" + str( val )
54
aux = aux.replace( "\n", "\n " );
55
ss += " %s:\n%s\n" % (key, aux[1:])