home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1946 < prev    next >
Encoding:
Text File  |  2009-04-15  |  1.7 KB  |  46 lines

  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. execute import ipy_constants as C
  42. execute print '*** C is the physical constants module'
  43.  
  44. # Files to execute
  45. execfile 
  46.