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

  1. # -*- Mode: Shell-Script -*-  Not really, but shows comments correctly
  2. #***************************************************************************
  3. # Configuration file for ipython -- ipythonrc format
  4. #
  5. # The format of this file is one of 'key value' lines.
  6. # Lines containing only whitespace at the beginning and then a # are ignored
  7. # as comments.  But comments can NOT be put on lines with data.
  8. #***************************************************************************
  9.  
  10. # If this file is found in the user's ~/.ipython directory as ipythonrc-pysh,
  11. # it can be loaded by calling passing the '-profile pysh' (or '-p pysh')
  12. # option to IPython.
  13.  
  14. # This profile turns IPython into a lightweight system shell with python
  15. # syntax.
  16.  
  17. # We only set a few options here, the rest is done in the companion pysh.py
  18. # file.  In the future _all_ of IPython's configuration will be done via
  19. # proper python code.
  20.  
  21. ############################################################################
  22. # First load common user configuration
  23. include ipythonrc
  24.  
  25. ############################################################################
  26. # Load all the actual syntax extensions for shell-like operation, which live
  27. # in the InterpreterExec standard extension.
  28. import_all IPython.Extensions.InterpreterExec
  29.  
  30. ############################################################################
  31. # PROMPTS
  32. #
  33. # Configure prompt for more shell-like usage.
  34.  
  35. # Most bash-like escapes can be used to customize IPython's prompts, as well as
  36. # a few additional ones which are IPython-specific.  All valid prompt escapes
  37. # are described in detail in the Customization section of the IPython HTML/PDF
  38. # manual.
  39.  
  40. prompt_in1 '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
  41. prompt_in2 '\C_Green|\C_LightGreen\D\C_Green> '
  42. prompt_out '<\#> '
  43.  
  44. # Here's a more complex prompt, showing the hostname and more path depth (\Y3)
  45. #prompt_in1 '\C_LightRed\u\C_Blue@\C_Red\h\C_LightBlue[\C_LightCyan\Y3\C_LightBlue]\C_LightGreen\#> '
  46.  
  47. # Select whether to left-pad the output prompts to match the length of the
  48. # input ones.  This allows you for example to use a simple '>' as an output
  49. # prompt, and yet have the output line up with the input.  If set to false,
  50. # the output prompts will be unpadded (flush left).
  51. prompts_pad_left 1
  52.  
  53.  
  54. # Remove all blank lines in between prompts, like a normal shell.
  55. separate_in 0
  56. separate_out 0
  57. separate_out2 0
  58.  
  59. # Allow special syntax (!, magics and aliases) in multiline input
  60. multi_line_specials 1
  61.  
  62. ############################################################################
  63. # ALIASES
  64.  
  65. # Declare some common aliases. Type alias? at an ipython prompt for details on
  66. # the syntax, use @unalias to delete existing aliases.
  67.  
  68. # Don't go too crazy here, the file pysh.py called below runs @rehash, which
  69. # loads ALL of your $PATH as aliases (except for Python keywords and
  70. # builtins).
  71.  
  72. # Some examples:
  73.  
  74. # A simple alias without arguments
  75. #alias cl clear
  76.  
  77. # An alias which expands the full line before the end of the alias.  This
  78. # lists only directories:
  79. #alias ldir pwd;ls -oF --color %l | grep /$
  80.  
  81. # An alias with two positional arguments:
  82. #alias parts echo 'First <%s> Second <%s>'
  83.  
  84. # In use these two aliases give (note that ldir is already built into IPython
  85. # for Unix):
  86.  
  87. #fperez[IPython]16> ldir
  88. #/usr/local/home/fperez/ipython/ipython/IPython
  89. #drwxr-xr-x  2 fperez  4096 Jun 21 01:01 CVS/
  90. #drwxr-xr-x  3 fperez  4096 Jun 21 01:10 Extensions/
  91. #drwxr-xr-x  3 fperez  4096 Jun 21 01:27 UserConfig/
  92.  
  93. #fperez[IPython]17> parts Hello world and goodbye
  94. #First <Hello> Second <world> and goodbye
  95.