/usr/share/pyshared/openturns/__init__.py is in python-openturns 1.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | # -*- Python -*-
#
# __init__.py
#
# Copyright (C) 2005-2013 EDF-EADS-Phimeca
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# along with this library. If not, see <http://www.gnu.org/licenses/>.
#
# @author dutka
# @date 2009-01-28 14:45:54 +0100 (mer, 28 jan 2009)
#
"""
Open TURNS --- The uncertainty engineering software
===================================================
Documentation is available online at http://www.openturns.org.
Contents
--------
Open TURNS imports all the functions from the OT namespace.
Available subpackages
---------------------
common --- Utility classes
wrapper --- Wrapping utilities
typ --- Internal data types
statistics --- Statistical classes
graph --- Graphical output
geom --- Geometrical primitives
func --- Function primitives
diff --- Differential algorithms
optim --- Optimization routines
solver --- Solvers
algo --- Approximation algorithms
experiment --- Non probabilistic designs of experiments
base --- Deterministic meta-package
classification --- Classification algorithms
model_copula --- Copulas
randomvector --- Random vectors
dist --- Probabilistic distributions
model_process --- Stochastic processes
weightedexperiment --- Probabilistic designs of experiments
orthogonalbasis --- Polynomial primitives
metamodel --- Meta-modelling
transformation --- Iso-probabilistic and process transformations
analytical --- Analytical uncertainty propagation algorithms
simulation --- Simulation uncertainty propagation algorithms
stattests --- Statistical tests
bayesian --- Bayesian updating
uncertainty --- Probabilistic meta-package
Utility tools
-------------
__version__ --- Open TURNS version string
Environment variables
---------------------
OPENTURNS_HOME --- Custom installation path
OPENTURNS_MODULE_PATH --- Submodule path
OPENTURNS_CONFIG_PATH --- Path to configuration file
OPENTURNS_WRAPPER_PATH --- Path to custom wrappers
OPENTURNS_LOG_SEVERITY --- Log severity flag, for example "ALL"
"""
import os
import sys
import platform
import warnings
if platform.system() == "Windows":
# the following line will be modified by the windows installer
OT_PYTHON_PATH = ""
if OT_PYTHON_PATH != "":
# set Path to OT module
os.environ['PATH'] = OT_PYTHON_PATH + ';' + os.environ['PATH']
# check if interactive mode
if not hasattr(sys, 'ps1'):
try:
# ipython does not define ps1
__IPYTHON__
except:
# Reset the default Crtl-C behavior
import signal
try:
signal.signal(signal.SIGINT, signal.SIG_DFL)
except ValueError:
pass
from .common import *
from .wrapper import *
from .typ import *
from .graph import *
from .geom import *
from .func import *
from .statistics import *
from .diff import *
from .optim import *
from .solver import *
from .algo import *
from .experiment import *
from .base import *
from .model_copula import *
from .randomvector import *
from .dist import *
from .model_process import *
from .weightedexperiment import *
from .classification import *
from .orthogonalbasis import *
from .metamodel import *
from .transformation import *
from .analytical import *
from .simulation import *
from .stattests import *
from .bayesian import *
from .uncertainty import *
from .coupling_tools import *
# TODO: remove deprecated Show function
def Show(graph):
warnings.warn(
'Show function is deprecated, use the viewer module instead.')
from .viewer import View
view = View(graph).show()
# define the version
__version__ = PlatformInfo.GetVersion()
# This code sets the sys.path (through site module) to point to the module
# standard dirs
dirs = os.getenv("OPENTURNS_MODULE_PATH", None)
if dirs:
import string
if(platform.system() != "Windows"):
path_separator = ":"
else:
path_separator = ";"
dirlist = string.split(dirs, path_separator)
else:
dirlist = list()
dirlist.append("%s/openturns/lib/openturns/module" % os.getenv("HOME"))
dirlist.append(Path.GetModuleDirectory())
dirlist.append(Path.GetInstallationDirectory())
import site
otpaths = set()
for d in dirlist:
if(platform.system() != "Windows"):
python_suffix = "/lib/python%d.%d/site-packages" % (
sys.version_info[0], sys.version_info[1])
else:
python_suffix = "/lib/python%d%d/site-packages" % (
sys.version_info[0], sys.version_info[1])
site.addsitedir(d + python_suffix, otpaths)
# print "known_paths =", otpaths
def PRINT(obj):
return repr(obj)
|