File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525or (directly from the terminal):
2626> pydoc amuse.ic
2727"""
28+
2829import sys
2930import os
3031import numpy
3132
3233_AMUSE_ROOT = os .path .abspath (os .path .dirname (__file__ ))
3334
35+
3436def numpy_fix ():
3537 try :
36- numpy .set_printoptions (legacy = ' 1.13' )
38+ numpy .set_printoptions (legacy = " 1.13" )
3739 except TypeError :
3840 pass
39-
41+
42+
4043numpy_fix ()
4144
42- class NoConfig (object ):
45+
46+ class NoConfig :
4347 def __init__ (self , message ):
44- self ._message = message
48+ self ._message = message
49+
4550 def __getattr__ (self , attr ):
4651 raise AttributeError (self ._message )
4752
53+
4854try :
4955 from . import config
50- except Exception as ex :
51- message = "Configuration not read in - or configuration invalid, exception:\n " + str (ex )
52- config = NoConfig (message )
56+ except FileNotFoundError as ex :
57+ message = (
58+ "Configuration not read in - or configuration invalid, exception:\n " + str (ex )
59+ )
60+ config = NoConfig (message )
5361
5462
5563# always report AMUSE reference information
5664try :
5765 from amuse .support .literature import TrackLiteratureReferences
66+
5867 TrackLiteratureReferences .default ()
5968except :
6069 pass
6170
71+
6272def get_data (path ):
63- return os .path .join (_AMUSE_ROOT , ' data' , path )
73+ return os .path .join (_AMUSE_ROOT , " data" , path )
You can’t perform that action at this time.
0 commit comments