~ellisonbg/ipython/bugfixes0411409

« back to all changes in this revision

Viewing changes to IPython/UserConfig/ipythonrc-physics

  • Committer: ville
  • Date: 2008-02-16 09:50:47 UTC
  • mto: (0.12.1 ipython_main)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: ville@ville-pc-20080216095047-500x6dluki1iz40o
initialization (no svn history)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Shell-Script -*-  Not really, but shows comments correctly
 
2
#***************************************************************************
 
3
#
 
4
# Configuration file for ipython -- ipythonrc format
 
5
#
 
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
#***************************************************************************
 
10
 
 
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.
 
14
 
 
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/)
 
18
 
 
19
# First load basic user configuration
 
20
include ipythonrc
 
21
 
 
22
# import ...
 
23
# Module with alternate input syntax for PhysicalQuantity objects.
 
24
import_mod IPython.Extensions.PhysicalQInput
 
25
 
 
26
# from ... import *
 
27
# math CANNOT be imported after PhysicalQInteractive. It will override the
 
28
# functions defined there.
 
29
import_all math IPython.Extensions.PhysicalQInteractive
 
30
 
 
31
# from ... import ...
 
32
import_some  
 
33
 
 
34
# code
 
35
execute q = PhysicalQuantityInteractive
 
36
execute g = PhysicalQuantityInteractive('9.8 m/s**2')
 
37
ececute rad = pi/180.
 
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'
 
41
 
 
42
# Files to execute
 
43
execfile