1
# -*- Mode: Shell-Script -*- Not really, but shows comments correctly
2
#***************************************************************************
4
# Configuration file for ipython -- ipythonrc format
6
# The format of this file is one of 'key value' lines.
7
# Lines containing only whitespace at the beginning and then a # are ignored
8
# as comments. But comments can NOT be put on lines with data.
9
#***************************************************************************
11
# If this file is found in the user's ~/.ipython directory as
12
# ipythonrc-physics, it can be loaded by calling passing the '-profile
13
# physics' (or '-p physics') option to IPython.
15
# This profile loads modules useful for doing interactive calculations with
16
# physical quantities (with units). It relies on modules from Konrad Hinsen's
17
# ScientificPython (http://dirac.cnrs-orleans.fr/ScientificPython/)
19
# First load basic user configuration
23
# Module with alternate input syntax for PhysicalQuantity objects.
24
import_mod IPython.Extensions.PhysicalQInput
27
# math CANNOT be imported after PhysicalQInteractive. It will override the
28
# functions defined there.
29
import_all math IPython.Extensions.PhysicalQInteractive
35
execute q = PhysicalQuantityInteractive
36
execute g = PhysicalQuantityInteractive('9.8 m/s**2')
38
execute print '*** q is an alias for PhysicalQuantityInteractive'
39
execute print '*** g = 9.8 m/s^2 has been defined'
40
execute print '*** rad = pi/180 has been defined'