diff --git a/src/dot_config/pythonstartup.py b/src/dot_config/pythonstartup.py new file mode 100644 index 0000000..a253afb --- /dev/null +++ b/src/dot_config/pythonstartup.py @@ -0,0 +1,7 @@ +try: + from sympy import init_session, Rational + init_session() + + R = Rational +except ImportError: + pass diff --git a/src/dot_config/vars.tmpl b/src/dot_config/vars.tmpl index 7621d0c..4fa546d 100644 --- a/src/dot_config/vars.tmpl +++ b/src/dot_config/vars.tmpl @@ -8,6 +8,9 @@ export VARS_SET=1 # by default chmod o-rwx umask 007 +# python rc/startup file +export PYTHONSTARTUP="$HOME/.config/pythonstartup.py" + # Set XDG directories export XDG_CONFIG_HOME="$HOME"/.config export XDG_CACHE_HOME="$HOME"/.cache