Ticket #12167: 12167_ipython_extcode.patch

File 12167_ipython_extcode.patch, 50.1 KB (added by jdemeyer, 9 years ago)
  • deleted file dist/debian/changelog

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1324053365 -3600
    # Node ID 7d16b4f460106d14792ff8ccc57b3924f945dceb
    # Parent  2013a823fe0f3f8609d20f56e7ae5785f8a2abb1
    Move SAGE_ROOT/ipython to extcode
    
    diff --git a/dist/debian/changelog b/dist/debian/changelog
    deleted file mode 100644
    + -  
    1 sagemath (2.10.4b-4) unstable; urgency=low
    2 
    3   * Build scipy_sandbox.
    4 
    5  -- Tim Abbott <tabbott@mit.edu>  Tue, 01 Apr 2008 01:50:30 -0400
    6 
    7 sagemath (2.10.4b-2) unstable; urgency=low
    8 
    9   * Various updates and verion number hack.
    10 
    11  -- Tim Abbott <tabbott@mit.edu>  Mon, 31 Mar 2008 16:20:52 -0400
    12 
    13 sagemath (2.10.4-1) unstable; urgency=low
    14 
    15   * Initial release.
    16 
    17  -- Tim Abbott <tabbott@mit.edu>  Wed, 14 Nov 2007 20:23:34 -0500
  • deleted file dist/debian/check-use-debian.pl

    diff --git a/dist/debian/check-use-debian.pl b/dist/debian/check-use-debian.pl
    deleted file mode 100755
    + -  
    1 #!/usr/bin/perl
    2 # Script to answer queries of the form "is this available in Debian"
    3 @use_debian = ('bzip2', 'atlas', 'blas', 'clisp', 'cvxopt', 'cython', 'ecm', 'f2c', 'freetype', 'gap', 'gd', 'gdmodule', 'gmp', 'gnutls', 'gsl', 'ipython', 'lapack', 'libgcrypt', 'libgpg_error', 'libpng', 'matplotlib', 'maxima', 'mercurial', 'moin', 'mpfi', 'mpfr', 'networkx', 'numpy', 'opencdk', 'pari', 'pexpect', 'pycrypto', 'python', 'python_gnutls', 'quaddouble', 'r', 'readline','scipy','scons','sqlalchemy','sqlite','sympy','termcap','twisted','weave','zlib','zodb3');
    4 @our_debian = ('cddlib', 'eclib', 'flint', 'flintqs', 'libfplll','genus2reduction','gfan','givaro','iml','lcalc','libm4ri','linbox','ntl','palp','singular','symmetrica','sympow','tachyon','rubiks','scipy_sandbox','zn_poly','polybori');
    5 @ignore = (@use_debian,@our_debian,'ipython1','setuptools','jmol');
    6 
    7 while(<>) {
    8     $arg = $_;
    9     print "arg: $arg\n";
    10     foreach (@ignore) {
    11         if ($arg =~ m/^$_-/) {
    12             $arg =~ s/.spkg$//;
    13             print "$arg";
    14             last;
    15         }
    16     }
    17 }
  • deleted file dist/debian/compat

    diff --git a/dist/debian/compat b/dist/debian/compat
    deleted file mode 100644
    + -  
    1 5
  • deleted file dist/debian/control

    diff --git a/dist/debian/control b/dist/debian/control
    deleted file mode 100644
    + -  
    1 Source: sagemath
    2 Section: math
    3 Priority: extra
    4 Maintainer: Tim Abbott <tabbott@mit.edu>
    5 Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27-1), libec-dev, libflint-dev, libgd2-xpm-dev, python-gd, libgmp3-dev, libiml-dev, ipython, liblinbox-dev, liblinbox-wrap-dev, python-matplotlib, mercurial, libmpfr-dev, libmpfi-dev, libntl-dev, libpari-dev, python-pexpect, python-crypto, python, python-dev, python2.5-dev, python2.5, cython, python-sympy, python2.5-zodb, python-numpy, python-networkx, libgivaro-dev, libgsl0-dev, libqd-dev, libgcrypt11-dev, libsingular-dev, scons, libsymmetrica-dev, libfplll-dev, r-base-dev, libatlas-base-dev, libm4ri-dev, libecm-dev, libgmp3-dev, gfortran, rsync, palp, libzn-poly-dev, libpolybori-dev, libboost-python-dev
    6 Standards-Version: 3.7.2
    7 
    8 Package: sagemath
    9 Architecture: any
    10 Depends: ${shlibs:Depends}, ${misc:Depends}, gap, singular, maxima, genus2reduction, lcalc, sympow, python-matplotlib, gfan, libiml0, libgd2-xpm, python-gd, mercurial, python-twisted, python-numpy, python-crypto, libflint0, flintqs, python-moinmoin, sqlite3, palp, ipython, python-gnutls, python-scipy, python-cvxopt, scons, r-recommended, libatlas-base-dev, gfortran, python-sqlalchemy, gmp-ecm, libntl0, libec0, python2.5-zodb, python-sympy, python-networkx, python-pexpect, cython, rubiks, python-twisted-web2, pari-gp, pari-extra, tachyon, libec-bin, python-rpy, python2.5-dev, libec-dev, libflint-dev, libgd2-xpm-dev, libgmp3-dev, libiml-dev, liblinbox-dev, liblinbox-wrap-dev, libmpfr-dev, libmpfi-dev, libntl-dev, libpari-dev, python-dev, python2.5-dev, python2.5, cython, python-sympy, libgivaro-dev, libgsl0-dev, libqd-dev, libgcrypt11-dev, libsingular-dev, libsymmetrica-dev, libfplll-dev, r-base-dev, libm4ri-dev, libecm-dev, libgmp3-dev, gap-guava, python-arpack, python-delaunay, libzn-poly-dev, polybori, libcdd-test, libcdd-dev
    11 Recommends: imagemagick
    12 Description: Open Source Mathematics Software
    13  Homepage: http://sagemath.org/
  • deleted file dist/debian/control.in

    diff --git a/dist/debian/control.in b/dist/debian/control.in
    deleted file mode 100644
    + -  
    1 Source: sagemath
    2 Section: math
    3 Priority: extra
    4 Maintainer: Tim Abbott <tabbott@mit.edu>
    5 Build-Depends: @cdbs@, libec-dev, libflint-dev, libgd2-xpm-dev, python-gd, libgmp3-dev, libiml-dev, ipython, liblinbox-dev, liblinbox-wrap-dev, python-matplotlib, mercurial, libmpfr-dev, libmpfi-dev, libntl-dev, libpari-dev, python-pexpect, python-crypto, python, python-dev, python2.5-dev, python2.5, cython, python-sympy, python2.5-zodb, python-numpy, python-networkx, libgivaro-dev, libgsl0-dev, libqd-dev, libgcrypt11-dev, libsingular-dev, scons, libsymmetrica-dev, libfplll-dev, r-base-dev, libatlas-base-dev, libm4ri-dev, libecm-dev, libgmp3-dev, gfortran, rsync, palp, libzn-poly-dev, libpolybori-dev, libboost-python-dev
    6 Standards-Version: 3.7.2
    7 
    8 Package: sagemath
    9 Architecture: any
    10 Depends: ${shlibs:Depends}, ${misc:Depends}, gap, singular, maxima, genus2reduction, lcalc, sympow, python-matplotlib, gfan, libiml0, libgd2-xpm, python-gd, mercurial, python-twisted, python-numpy, python-crypto, libflint0, flintqs, python-moinmoin, sqlite3, palp, ipython, python-gnutls, python-scipy, python-cvxopt, scons, r-recommended, libatlas-base-dev, gfortran, python-sqlalchemy, gmp-ecm, libntl0, libec0, python2.5-zodb, python-sympy, python-networkx, python-pexpect, cython, rubiks, python-twisted-web2, pari-gp, pari-extra, tachyon, libec-bin, python-rpy, python2.5-dev, libec-dev, libflint-dev, libgd2-xpm-dev, libgmp3-dev, libiml-dev, liblinbox-dev, liblinbox-wrap-dev, libmpfr-dev, libmpfi-dev, libntl-dev, libpari-dev, python-dev, python2.5-dev, python2.5, cython, python-sympy, libgivaro-dev, libgsl0-dev, libqd-dev, libgcrypt11-dev, libsingular-dev, libsymmetrica-dev, libfplll-dev, r-base-dev, libm4ri-dev, libecm-dev, libgmp3-dev, gap-guava, python-arpack, python-delaunay, libzn-poly-dev, polybori, libcdd-test, libcdd-dev
    11 Recommends: imagemagick
    12 Description: Open Source Mathematics Software
    13  Homepage: http://sagemath.org/
  • deleted file dist/debian/copyright

    diff --git a/dist/debian/copyright b/dist/debian/copyright
    deleted file mode 100644
    + -  
    1 This package was debianized by Tim Abbott <tabbott@mit.edu> in 2008.
    2 
    3 It was downloaded from http://sagemath.org/
    4 
    5 Upstream Author: William Stein <wstein@gmail.com>
    6 
    7 Copyright: (C) 2005-2008 William Stein
    8 
    9 License:
    10 
    11    This package is free software; you can redistribute it and/or modify
    12    it under the terms of the GNU General Public License as published by
    13    the Free Software Foundation; either version 2 of the License, or
    14    (at your option) any later version.
    15 
    16    This package is distributed in the hope that it will be useful,
    17    but WITHOUT ANY WARRANTY; without even the implied warranty of
    18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19    GNU General Public License for more details.
    20 
    21    You should have received a copy of the GNU General Public License
    22    along with this package; if not, write to the Free Software
    23    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
    24 
    25 On Debian systems, the complete text of the GNU General
    26 Public License can be found in `/usr/share/common-licenses/GPL'.
    27 
    28 The Debian packaging is (C) 2008, Tim Abbott <tabbott@mit.edu> and is
    29 licensed under the GPL, see above.
  • deleted file dist/debian/rules

    diff --git a/dist/debian/rules b/dist/debian/rules
    deleted file mode 100644
    + -  
    1 #!/usr/bin/make -f
    2 
    3 DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
    4 include /usr/share/cdbs/1/rules/debhelper.mk
    5 include /usr/share/cdbs/1/class/makefile.mk
    6 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
    7 
    8 debian/stamp-makefile-build: debian/stamp-sage-build
    9 
    10 common-build-arch common-build-indep:: debian/stamp-sage-build
    11 debian/stamp-sage-build:
    12 # setup for sage build.
    13         (cd spkg && ./install installed/dir-0.1)
    14         (cd spkg && touch installed/`./standard/newest_version -base bzip2`)
    15         (cd spkg && touch installed/`./standard/newest_version -base prereq`)
    16         for i in `ls spkg/standard/*.spkg | cut -f 3 -d'/' | perl debian/check-use-debian.pl`; do \
    17             touch spkg/installed/$$i; \
    18             echo spkg/installed/$$i; \
    19         done
    20         touch $@
    21         ln -s /usr/bin/python2.5 python
    22 
    23 clean:: sage-clean
    24 sage-clean::
    25         rm -f debian/stamp-sage-build
    26 
    27 DEB_MAKE_ENVVARS += PYTHONHOME=/usr SAGE_DEBIAN=yes DEBIAN_RELEASE= SAGE_FORTRAN=/usr/bin/gfortran PYTHON=`pwd`/python
    28 DEB_MAKE_CLEAN_TARGET = distclean
    29 
    30 common-install-arch common-install-indep:: common-install-sage
    31 common-install-sage::
    32         ln -sf /usr/bin/python2.5 local/bin/python
    33         ln -sf /usr/lib/libsingular.so local/lib/
    34         mkdir -p local/share
    35         ln -sf /usr/share/pari local/share/
    36         ln -sf /usr/lib/palp/*.x local/bin
    37         ln -sf /usr/lib/cdd-test/* local/bin
    38         rm -f spkg/standard/* # prevent disk shortage
    39         mkdir -p debian/sagemath/usr/lib/sagemath/
    40         mv usr/lib/python2.5 $(DEB_DESTDIR)/usr/lib/
    41         rsync -azv --exclude=debian . debian/sagemath/usr/lib/sagemath/
    42 #       rm -rf devel local # prevent disk shortage
  • deleted file dist/debian/sage

    diff --git a/dist/debian/sage b/dist/debian/sage
    deleted file mode 100755
    + -  
    1 #!/bin/sh
    2 export PATH=/usr/lib/sagemath/local/bin:$PATH
    3 export SINGULAR_DEFAULT_DIR=/usr/lib/singular
    4 export MATPLOTLIBDATA=/usr/share/matplotlib/mpl-data/
    5 if [ -z "$SAGE_TESTDIR" ]; then
    6     export SAGE_TESTDIR=~/.sage/tests
    7 fi
    8 cd /usr/lib/sagemath
    9 exec ./sage "$@"
    10 
  • deleted file dist/debian/sagemath.install

    diff --git a/dist/debian/sagemath.install b/dist/debian/sagemath.install
    deleted file mode 100755
    + -  
    1 debian/sage usr/bin
  • new file dotsage/ipython/ipy_profile_sh.py

    diff --git a/dotsage/ipython/ipy_profile_sh.py b/dotsage/ipython/ipy_profile_sh.py
    new file mode 100644
    - +  
     1"""Shell mode for IPython.
     2
     3Start ipython in shell mode by invoking "ipython -p sh"
     4
     5(the old version, "ipython -p pysh" still works but this is the more "modern"
     6shell mode and is recommended for users who don't care about pysh-mode
     7compatibility)
     8"""
     9
     10from IPython import ipapi
     11import os,textwrap
     12
     13# The import below effectively obsoletes your old-style ipythonrc[.ini],
     14# so consider yourself warned!
     15
     16import ipy_defaults
     17
     18def main():
     19    ip = ipapi.get()
     20    o = ip.options
     21    # autocall to "full" mode (smart mode is default, I like full mode)
     22
     23    o.autocall = 2
     24
     25    # Jason Orendorff's path class is handy to have in user namespace
     26    # if you are doing shell-like stuff
     27    try:
     28        ip.ex("from path import path" )
     29    except ImportError:
     30        pass
     31
     32    ip.ex('import os')
     33    ip.ex("def up(): os.chdir('..')")
     34
     35    # Get pysh-like prompt for all profiles.
     36
     37    o.prompt_in1= '\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
     38    o.prompt_in2= '\C_Green|\C_LightGreen\D\C_Green> '
     39    o.prompt_out= '<\#> '
     40
     41    from IPython import Release
     42
     43    import sys
     44    # I like my banner minimal.
     45    o.banner = "Py %s IPy %s\n" % (sys.version.split('\n')[0],Release.version)
     46
     47    # make 'd' an alias for ls -F
     48
     49    ip.magic('alias d ls -F --color=auto')
     50
     51    # Make available all system commands through "rehashing" immediately.
     52    # You can comment these lines out to speed up startup on very slow
     53    # machines, and to conserve a bit of memory. Note that pysh profile does this
     54    # automatically
     55    ip.IP.default_option('cd','-q')
     56
     57
     58    o.prompts_pad_left="1"
     59    # Remove all blank lines in between prompts, like a normal shell.
     60    o.separate_in="0"
     61    o.separate_out="0"
     62    o.separate_out2="0"
     63
     64    # now alias all syscommands
     65
     66    db = ip.db
     67
     68    syscmds = db.get("syscmdlist",[] )
     69    if not syscmds:
     70        print textwrap.dedent("""
     71        System command list not initialized, probably the first run...
     72        running %rehashx to refresh the command list. Run %rehashx
     73        again to refresh command list (after installing new software etc.)
     74        """)
     75        ip.magic('rehashx')
     76        syscmds = db.get("syscmdlist")
     77    for cmd in syscmds:
     78        #print "al",cmd
     79        noext, ext = os.path.splitext(cmd)
     80        ip.IP.alias_table[noext] = (0,cmd)
     81
     82main()
  • new file dotsage/ipython/ipy_user_conf.py

    diff --git a/dotsage/ipython/ipy_user_conf.py b/dotsage/ipython/ipy_user_conf.py
    new file mode 100644
    - +  
     1""" User configuration file for IPython
     2
     3This is a more flexible and safe way to configure ipython than *rc files
     4(ipythonrc, ipythonrc-pysh etc.)
     5
     6This file is always imported on ipython startup. You can import the
     7ipython extensions you need here (see IPython/Extensions directory).
     8
     9Feel free to edit this file to customize your ipython experience.
     10
     11Note that as such this file does nothing, for backwards compatibility.
     12Consult e.g. file 'ipy_profile_sh.py' for an example of the things
     13you can do here.
     14
     15"""
     16
     17# Most of your config files and extensions will probably start with this import
     18
     19import IPython.ipapi
     20ip = IPython.ipapi.get()
     21
     22# You probably want to uncomment this if you did %upgrade -nolegacy
     23# import ipy_defaults
     24
     25def main():
     26    o = ip.options
     27    # An example on how to set options
     28    #o.autocall = 1
     29
     30main()
  • new file dotsage/ipython/ipythonrc

    diff --git a/dotsage/ipython/ipythonrc b/dotsage/ipython/ipythonrc
    new file mode 100644
    - +  
     1# -*- Mode: Shell-Script -*-  Not really, but shows comments correctly
     2# $Id: ipythonrc 1329 2006-05-26 07:52:45Z fperez $
     3
     4#***************************************************************************
     5#
     6# Configuration file for IPython -- ipythonrc format
     7#
     8# The format of this file is simply one of 'key value' lines.
     9# Lines containing only whitespace at the beginning and then a # are ignored
     10# as comments. But comments can NOT be put on lines with data.
     11
     12# The meaning and use of each key are explained below.
     13
     14#---------------------------------------------------------------------------
     15# Section: included files
     16
     17# Put one or more *config* files (with the syntax of this file) you want to
     18# include. For keys with a unique value the outermost file has precedence. For
     19# keys with multiple values, they all get assembled into a list which then
     20# gets loaded by IPython.
     21
     22# In this file, all lists of things should simply be space-separated.
     23
     24# This allows you to build hierarchies of files which recursively load
     25# lower-level services. If this is your main ~/.ipython/ipythonrc file, you
     26# should only keep here basic things you always want available. Then you can
     27# include it in every other special-purpose config file you create.
     28include
     29
     30#---------------------------------------------------------------------------
     31# Section: startup setup
     32
     33# These are mostly things which parallel a command line option of the same
     34# name.
     35
     36# Keys in this section should only appear once. If any key from this section
     37# is encountered more than once, the last value remains, all earlier ones get
     38# discarded.
     39
     40
     41# Automatic calling of callable objects.  If set to 1 or 2, callable objects
     42# are automatically called when invoked at the command line, even if you don't
     43# type parentheses.  IPython adds the parentheses for you.  For example:
     44
     45#In [1]: str 45
     46#------> str(45)
     47#Out[1]: '45'
     48
     49# IPython reprints your line with '---->' indicating that it added
     50# parentheses.  While this option is very convenient for interactive use, it
     51# may occasionally cause problems with objects which have side-effects if
     52# called unexpectedly.
     53
     54# The valid values for autocall are:
     55
     56# autocall 0 -> disabled (you can toggle it at runtime with the %autocall magic)
     57
     58# autocall 1 -> active, but do not apply if there are no arguments on the line.
     59
     60# In this mode, you get:
     61
     62#In [1]: callable
     63#Out[1]: <built-in function callable>
     64
     65#In [2]: callable 'hello'
     66#------> callable('hello')
     67#Out[2]: False
     68
     69# 2 -> Active always.  Even if no arguments are present, the callable object
     70# is called:
     71
     72#In [4]: callable
     73#------> callable()
     74
     75# Note that even with autocall off, you can still use '/' at the start of a
     76# line to treat the first argument on the command line as a function and add
     77# parentheses to it:
     78
     79#In [8]: /str 43
     80#------> str(43)
     81#Out[8]: '43'
     82
     83autocall 0
     84
     85# Auto-edit syntax errors.  When you use the %edit magic in ipython to edit
     86# source code (see the 'editor' variable below), it is possible that you save
     87# a file with syntax errors in it.  If this variable is true, IPython will ask
     88# you whether to re-open the editor immediately to correct such an error.
     89
     90autoedit_syntax 0
     91
     92# Auto-indent. IPython can recognize lines ending in ':' and indent the next
     93# line, while also un-indenting automatically after 'raise' or 'return'.
     94
     95# This feature uses the readline library, so it will honor your ~/.inputrc
     96# configuration (or whatever file your INPUTRC variable points to).  Adding
     97# the following lines to your .inputrc file can make indent/unindenting more
     98# convenient (M-i indents, M-u unindents):
     99
     100#  $if Python
     101#  "\M-i": "    "
     102#  "\M-u": "\d\d\d\d"
     103#  $endif
     104
     105# The feature is potentially a bit dangerous, because it can cause problems
     106# with pasting of indented code (the pasted code gets re-indented on each
     107# line).  But it's a huge time-saver when working interactively.  The magic
     108# function %autoindent allows you to toggle it on/off at runtime.
     109
     110autoindent 1
     111
     112# Auto-magic. This gives you access to all the magic functions without having
     113# to prepend them with an % sign. If you define a variable with the same name
     114# as a magic function (say who=1), you will need to access the magic function
     115# with % (%who in this example). However, if later you delete your variable
     116# (del who), you'll recover the automagic calling form.
     117
     118# Considering that many magic functions provide a lot of shell-like
     119# functionality, automagic gives you something close to a full Python+system
     120# shell environment (and you can extend it further if you want).
     121
     122automagic 1
     123
     124# Size of the output cache. After this many entries are stored, the cache will
     125# get flushed. Depending on the size of your intermediate calculations, you
     126# may have memory problems if you make it too big, since keeping things in the
     127# cache prevents Python from reclaiming the memory for old results. Experiment
     128# with a value that works well for you.
     129
     130# If you choose cache_size 0 IPython will revert to python's regular >>>
     131# unnumbered prompt. You will still have _, __ and ___ for your last three
     132# results, but that will be it.  No dynamic _1, _2, etc. will be created. If
     133# you are running on a slow machine or with very limited memory, this may
     134# help.
     135
     136cache_size 1000
     137
     138# Classic mode: Setting 'classic 1' you lose many of IPython niceties,
     139# but that's your choice! Classic 1 -> same as IPython -classic.
     140# Note that this is _not_ the normal python interpreter, it's simply
     141# IPython emulating most of the classic interpreter's behavior.
     142classic 0
     143
     144# colors - Coloring option for prompts and traceback printouts.
     145
     146# Currently available schemes: NoColor, Linux, LightBG.
     147
     148# This option allows coloring the prompts and traceback printouts. This
     149# requires a terminal which can properly handle color escape sequences. If you
     150# are having problems with this, use the NoColor scheme (uses no color escapes
     151# at all).
     152
     153# The Linux option works well in linux console type environments: dark
     154# background with light fonts.
     155
     156# LightBG is similar to Linux but swaps dark/light colors to be more readable
     157# in light background terminals.
     158
     159# keep uncommented only the one you want:
     160#colors Linux
     161#colors LightBG
     162colors NoColor
     163
     164########################
     165# Note to Windows users
     166#
     167# Color and readline support is avaialble to Windows users via Gary Bishop's
     168# readline library.  You can find Gary's tools at
     169# http://sourceforge.net/projects/uncpythontools.
     170# Note that his readline module requires in turn the ctypes library, available
     171# at http://starship.python.net/crew/theller/ctypes.
     172########################
     173
     174# color_info: IPython can display information about objects via a set of
     175# functions, and optionally can use colors for this, syntax highlighting
     176# source code and various other elements. This information is passed through a
     177# pager (it defaults to 'less' if $PAGER is not set).
     178
     179# If your pager has problems, try to setting it to properly handle escapes
     180# (see the less manpage for detail), or disable this option.  The magic
     181# function %color_info allows you to toggle this interactively for testing.
     182
     183color_info 1
     184
     185# confirm_exit: set to 1 if you want IPython to confirm when you try to exit
     186# with an EOF (Control-d in Unix, Control-Z/Enter in Windows). Note that using
     187# the magic functions %Exit or %Quit you can force a direct exit, bypassing
     188# any confirmation.
     189
     190confirm_exit 0
     191
     192# Use deep_reload() as a substitute for reload() by default. deep_reload() is
     193# still available as dreload() and appears as a builtin.
     194
     195deep_reload 0
     196
     197# Which editor to use with the %edit command. If you leave this at 0, IPython
     198# will honor your EDITOR environment variable. Since this editor is invoked on
     199# the fly by ipython and is meant for editing small code snippets, you may
     200# want to use a small, lightweight editor here.
     201
     202# For Emacs users, setting up your Emacs server properly as described in the
     203# manual is a good idea. An alternative is to use jed, a very light editor
     204# with much of the feel of Emacs (though not as powerful for heavy-duty work).
     205
     206editor 0
     207
     208# log 1 -> same as ipython -log. This automatically logs to ./ipython.log
     209log 0
     210
     211# Same as ipython -Logfile YourLogfileName.
     212# Don't use with log 1 (use one or the other)
     213logfile ''
     214
     215# banner 0 -> same as ipython -nobanner
     216banner 0
     217
     218# messages 0 -> same as ipython -nomessages
     219messages 1
     220
     221# Automatically call the pdb debugger after every uncaught exception. If you
     222# are used to debugging using pdb, this puts you automatically inside of it
     223# after any call (either in IPython or in code called by it) which triggers an
     224# exception which goes uncaught.
     225pdb 0
     226
     227# Enable the pprint module for printing. pprint tends to give a more readable
     228# display (than print) for complex nested data structures.
     229pprint 1
     230
     231# Prompt strings
     232
     233# Most bash-like escapes can be used to customize IPython's prompts, as well as
     234# a few additional ones which are IPython-specific.  All valid prompt escapes
     235# are described in detail in the Customization section of the IPython HTML/PDF
     236# manual.
     237
     238# Use \# to represent the current prompt number, and quote them to protect
     239# spaces.
     240#prompt_in1 'In [\#]: '
     241prompt_in1 '${sage_prompt()}: '
     242
     243# \D is replaced by as many dots as there are digits in the
     244# current value of \#.
     245#prompt_in2 '   .\D.: '
     246# From F. Perez On oct 6.
     247prompt_in2 '${'.'*len(sage_prompt())}: '
     248
     249#prompt_out 'Out[\#]: '
     250prompt_out ''
     251
     252# Select whether to left-pad the output prompts to match the length of the
     253# input ones.  This allows you for example to use a simple '>' as an output
     254# prompt, and yet have the output line up with the input.  If set to false,
     255# the output prompts will be unpadded (flush left).
     256prompts_pad_left 0
     257
     258# quick 1 -> same as ipython -quick
     259quick 0
     260
     261# Use the readline library (1) or not (0). Most users will want this on, but
     262# if you experience strange problems with line management (mainly when using
     263# IPython inside Emacs buffers) you may try disabling it. Not having it on
     264# prevents you from getting command history with the arrow keys, searching and
     265# name completion using TAB.
     266
     267readline 1
     268
     269# Screen Length: number of lines of your screen. This is used to control
     270# printing of very long strings. Strings longer than this number of lines will
     271# be paged with the less command instead of directly printed.
     272
     273# The default value for this is 0, which means IPython will auto-detect your
     274# screen size every time it needs to print. If for some reason this isn't
     275# working well (it needs curses support), specify it yourself. Otherwise don't
     276# change the default.
     277
     278screen_length 0
     279
     280# Prompt separators for input and output.
     281# Use \n for newline explicitly, without quotes.
     282# Use 0 (like at the cmd line) to turn off a given separator.
     283
     284# The structure of prompt printing is:
     285# (SeparateIn)Input....
     286# (SeparateOut)Output...
     287# (SeparateOut2),   # that is, no newline is printed after Out2
     288# By choosing these you can organize your output any way you want.
     289
     290separate_in 0
     291separate_out 0
     292separate_out2 0
     293
     294# 'nosep 1' is a shorthand for '-SeparateIn 0 -SeparateOut 0 -SeparateOut2 0'.
     295# Simply removes all input/output separators, overriding the choices above.
     296nosep 0
     297
     298# Wildcard searches - IPython has a system for searching names using
     299# shell-like wildcards; type %psearch? for details.  This variables sets
     300# whether by default such searches should be case sensitive or not.  You can
     301# always override the default at the system command line or the IPython
     302# prompt.
     303
     304wildcards_case_sensitive 1
     305
     306# Object information: at what level of detail to display the string form of an
     307# object.  If set to 0, ipython will compute the string form of any object X,
     308# by calling str(X), when X? is typed.  If set to 1, str(X) will only be
     309# computed when X?? is given, and if set to 2 or higher, it will never be
     310# computed (there is no X??? level of detail).  This is mostly of use to
     311# people who frequently manipulate objects whose string representation is
     312# extremely expensive to compute.
     313
     314object_info_string_level 0
     315
     316# xmode - Exception reporting mode.
     317
     318# Valid modes: Plain, Context and Verbose.
     319
     320# Plain: similar to python's normal traceback printing.
     321
     322# Context: prints 5 lines of context source code around each line in the
     323# traceback.
     324
     325# Verbose: similar to Context, but additionally prints the variables currently
     326# visible where the exception happened (shortening their strings if too
     327# long). This can potentially be very slow, if you happen to have a huge data
     328# structure whose string representation is complex to compute. Your computer
     329# may appear to freeze for a while with cpu usage at 100%. If this occurs, you
     330# can cancel the traceback with Ctrl-C (maybe hitting it more than once).
     331
     332#xmode Plain
     333xmode Context
     334#xmode Verbose
     335
     336# multi_line_specials: if true, allow magics, aliases and shell escapes (via
     337# !cmd) to be used in multi-line input (like for loops).  For example, if you
     338# have this active, the following is valid in IPython:
     339#
     340#In [17]: for i in range(3):
     341#   ....:     mkdir $i
     342#   ....:     !touch $i/hello
     343#   ....:     ls -l $i
     344
     345multi_line_specials 1
     346
     347# wxversion: request a specific wxPython version (used for -wthread)
     348
     349# Set this to the value of wxPython you want to use, but note that this
     350# feature requires you to have the wxversion Python module to work.  If you
     351# don't have the wxversion module (try 'import wxversion' at the prompt to
     352# check) or simply want to leave the system to pick up the default, leave this
     353# variable at 0.
     354
     355wxversion 0
     356
     357#---------------------------------------------------------------------------
     358# Section: Readline configuration (readline is not available for MS-Windows)
     359
     360# This is done via the following options:
     361
     362# (i) readline_parse_and_bind: this option can appear as many times as you
     363# want, each time defining a string to be executed via a
     364# readline.parse_and_bind() command. The syntax for valid commands of this
     365# kind can be found by reading the documentation for the GNU readline library,
     366# as these commands are of the kind which readline accepts in its
     367# configuration file.
     368
     369# The TAB key can be used to complete names at the command line in one of two
     370# ways: 'complete' and 'menu-complete'. The difference is that 'complete' only
     371# completes as much as possible while 'menu-complete' cycles through all
     372# possible completions. Leave the one you prefer uncommented.
     373
     374readline_parse_and_bind tab: complete
     375#readline_parse_and_bind tab: menu-complete
     376
     377# This binds Control-l to printing the list of all possible completions when
     378# there is more than one (what 'complete' does when hitting TAB twice, or at
     379# the first TAB if show-all-if-ambiguous is on)
     380readline_parse_and_bind "\C-l": possible-completions
     381
     382# This forces readline to automatically print the above list when tab
     383# completion is set to 'complete'. You can still get this list manually by
     384# using the key bound to 'possible-completions' (Control-l by default) or by
     385# hitting TAB twice. Turning this on makes the printing happen at the first
     386# TAB.
     387readline_parse_and_bind set show-all-if-ambiguous on
     388
     389# If you have TAB set to complete names, you can rebind any key (Control-o by
     390# default) to insert a true TAB character.
     391readline_parse_and_bind "\C-o": tab-insert
     392
     393# These commands allow you to indent/unindent easily, with the 4-space
     394# convention of the Python coding standards.  Since IPython's internal
     395# auto-indent system also uses 4 spaces, you should not change the number of
     396# spaces in the code below.
     397readline_parse_and_bind "\M-i": "    "
     398readline_parse_and_bind "\M-o": "\d\d\d\d"
     399readline_parse_and_bind "\M-I": "\d\d\d\d"
     400
     401# Bindings for incremental searches in the history. These searches use the
     402# string typed so far on the command line and search anything in the previous
     403# input history containing them.
     404readline_parse_and_bind "\C-r": reverse-search-history
     405readline_parse_and_bind "\C-s": forward-search-history
     406
     407# Bindings for completing the current line in the history of previous
     408# commands. This allows you to recall any previous command by typing its first
     409# few letters and hitting Control-p, bypassing all intermediate commands which
     410# may be in the history (much faster than hitting up-arrow 50 times!)
     411readline_parse_and_bind "\C-p": history-search-backward
     412readline_parse_and_bind "\C-n": history-search-forward
     413
     414# I also like to have the same functionality on the plain arrow keys. If you'd
     415# rather have the arrows use all the history (and not just match what you've
     416# typed so far), comment out or delete the next two lines.
     417readline_parse_and_bind "\e[A": history-search-backward
     418readline_parse_and_bind "\e[B": history-search-forward
     419
     420# These are typically on by default under *nix, but not win32.
     421readline_parse_and_bind "\C-k": kill-line
     422readline_parse_and_bind "\C-u": unix-line-discard
     423
     424# (ii) readline_remove_delims: a string of characters to be removed from the
     425# default word-delimiters list used by readline, so that completions may be
     426# performed on strings which contain them.
     427
     428readline_remove_delims -/~
     429
     430# (iii) readline_merge_completions: whether to merge the result of all
     431# possible completions or not.  If true, IPython will complete filenames,
     432# python names and aliases and return all possible completions.  If you set it
     433# to false, each completer is used at a time, and only if it doesn't return
     434# any completions is the next one used.
     435
     436# The default order is: [python_matches, file_matches, alias_matches]
     437
     438readline_merge_completions 1
     439
     440# (iv) readline_omit__names: normally hitting <tab> after a '.' in a name
     441# will complete all attributes of an object, including all the special methods
     442# whose names start with single or double underscores (like __getitem__ or
     443# __class__).
     444
     445# This variable allows you to control this completion behavior:
     446
     447# readline_omit__names 1 -> completion will omit showing any names starting
     448# with two __, but it will still show names starting with one _.
     449
     450# readline_omit__names 2 -> completion will omit all names beginning with one
     451# _ (which obviously means filtering out the double __ ones).
     452
     453# Even when this option is set, you can still see those names by explicitly
     454# typing a _ after the period and hitting <tab>: 'name._<tab>' will always
     455# complete attribute names starting with '_'.
     456
     457# This option is off by default so that new users see all attributes of any
     458# objects they are dealing with.
     459
     460readline_omit__names 2
     461
     462#---------------------------------------------------------------------------
     463# Section: modules to be loaded with 'import ...'
     464
     465# List, separated by spaces, the names of the modules you want to import
     466
     467# Example:
     468# import_mod sys os
     469# will produce internally the statements
     470# import sys
     471# import os
     472
     473# Each import is executed in its own try/except block, so if one module
     474# fails to load the others will still be ok.
     475
     476import_mod
     477
     478#---------------------------------------------------------------------------
     479# Section: modules to import some functions from: 'from ... import ...'
     480
     481# List, one per line, the modules for which you want only to import some
     482# functions. Give the module name first and then the name of functions to be
     483# imported from that module.
     484
     485# Example:
     486
     487# import_some IPython.genutils timing timings
     488# will produce internally the statement
     489# from IPython.genutils import timing, timings
     490
     491# timing() and timings() are two IPython utilities for timing the execution of
     492# your own functions, which you may find useful.  Just commment out the above
     493# line if you want to test them.
     494
     495# If you have more than one modules_some line, each gets its own try/except
     496# block (like modules, see above).
     497
     498import_some
     499
     500#---------------------------------------------------------------------------
     501# Section: modules to import all from : 'from ... import *'
     502
     503# List (same syntax as import_mod above) those modules for which you want to
     504# import all functions. Remember, this is a potentially dangerous thing to do,
     505# since it is very easy to overwrite names of things you need. Use with
     506# caution.
     507
     508# Example:
     509# import_all sys os
     510# will produce internally the statements
     511# from sys import *
     512# from os import *
     513
     514# As before, each will be called in a separate try/except block.
     515
     516import_all
     517
     518#---------------------------------------------------------------------------
     519# Section: Python code to execute.
     520
     521# Put here code to be explicitly executed (keep it simple!)
     522# Put one line of python code per line. All whitespace is removed (this is a
     523# feature, not a bug), so don't get fancy building loops here.
     524# This is just for quick convenient creation of things you want available.
     525
     526# Example:
     527# execute x = 1
     528# execute print 'hello world'; y = z = 'a'
     529# will produce internally
     530# x = 1
     531# print 'hello world'; y = z = 'a'
     532# and each *line* (not each statement, we don't do python syntax parsing) is
     533# executed in its own try/except block.
     534
     535execute
     536
     537execute def view_all(): view([(i, globals()[i]) for i in variables()], title='All SAGE Variables')
     538execute def variables(): return [k for k in globals() if not k in iglob and len(k) > 0 and k[0] != '_']
     539execute import sage.misc.preparser_ipython;  sage.misc.preparser_ipython.magma_colon_equals=True
     540
     541
     542# Note for the adventurous: you can use this to define your own names for the
     543# magic functions, by playing some namespace tricks:
     544
     545# execute __IPYTHON__.magic_pf = __IPYTHON__.magic_profile
     546
     547# defines %pf as a new name for %profile.
     548
     549#---------------------------------------------------------------------------
     550# Section: Python files to load and execute.
     551
     552# Put here the full names of files you want executed with execfile(file).  If
     553# you want complicated initialization, just write whatever you want in a
     554# regular python file and load it from here.
     555
     556# Filenames defined here (which *must* include the extension) are searched for
     557# through all of sys.path. Since IPython adds your .ipython directory to
     558# sys.path, they can also be placed in your .ipython dir and will be
     559# found. Otherwise (if you want to execute things not in .ipyton nor in
     560# sys.path) give a full path (you can use ~, it gets expanded)
     561
     562# Example:
     563# execfile file1.py ~/file2.py
     564# will generate
     565# execfile('file1.py')
     566# execfile('_path_to_your_home/file2.py')
     567
     568# As before, each file gets its own try/except block.
     569
     570execfile
     571
     572# If you are feeling adventurous, you can even add functionality to IPython
     573# through here. IPython works through a global variable called __ip which
     574# exists at the time when these files are read. If you know what you are doing
     575# (read the source) you can add functions to __ip in files loaded here.
     576
     577# The file example-magic.py contains a simple but correct example. Try it:
     578
     579# execfile example-magic.py
     580
     581# Look at the examples in IPython/iplib.py for more details on how these magic
     582# functions need to process their arguments.
     583
     584#---------------------------------------------------------------------------
     585# Section: aliases for system shell commands
     586
     587# Here you can define your own names for system commands. The syntax is
     588# similar to that of the builtin %alias function:
     589
     590# alias alias_name command_string
     591
     592# The resulting aliases are auto-generated magic functions (hence usable as
     593# %alias_name)
     594
     595# For example:
     596
     597# alias myls ls -la
     598
     599# will define 'myls' as an alias for executing the system command 'ls -la'.
     600# This allows you to customize IPython's environment to have the same aliases
     601# you are accustomed to from your own shell.
     602
     603# You can also define aliases with parameters using %s specifiers (one per
     604# parameter):
     605
     606# alias parts echo first %s second %s
     607
     608# will give you in IPython:
     609# >>> %parts A B
     610# first A second B
     611
     612# Use one 'alias' statement per alias you wish to define.
     613
     614# alias
     615
     616#************************* end of file <ipythonrc> ************************
  • new file dotsage/ipython/ipythonrc-math

    diff --git a/dotsage/ipython/ipythonrc-math b/dotsage/ipython/ipythonrc-math
    new file mode 100644
    - +  
     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# This is an example of a 'profile' file which includes a base file and adds
     12# some customizaton for a particular purpose.
     13
     14# If this file is found in the user's ~/.ipython directory as ipythonrc-math,
     15# it can be loaded by calling passing the '-profile math' (or '-p math')
     16# option to IPython.
     17
     18# This example is a light customization to have ipython have basic math functions
     19# readily available, effectively making the python prompt a very capable scientific
     20# calculator
     21
     22# include base config and only add some extras
     23include ipythonrc
     24
     25# load the complex math functions but keep them in a separate namespace
     26import_mod cmath
     27
     28# from ... import *
     29# load the real math functions in the global namespace for convenience
     30import_all math
     31
     32# from ... import ...
     33import_some
     34
     35# code to execute
     36execute print "*** math functions available globally, cmath as a module"
  • new file dotsage/ipython/ipythonrc-numeric

    diff --git a/dotsage/ipython/ipythonrc-numeric b/dotsage/ipython/ipythonrc-numeric
    new file mode 100644
    - +  
     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# This is an example of a 'profile' file which includes a base file and adds
     12# some customizaton for a particular purpose.
     13
     14# If this file is found in the user's ~/.ipython directory as
     15# ipythonrc-numeric, it can be loaded by calling passing the '-profile
     16# numeric' (or '-p numeric') option to IPython.
     17
     18# A simple alias numpy -> 'ipython -p numeric' makes life very convenient.
     19
     20# This example is meant to load several modules to turn IPython into a very
     21# capable environment for high-end numerical work, similar to IDL or MatLab
     22# but with the beauty and flexibility of the Python language.
     23
     24# Load the user's basic configuration
     25include ipythonrc
     26
     27# import ...
     28
     29# Load Numeric by itself so that 'help Numeric' works
     30import_mod Numeric
     31
     32# from ... import *
     33# GnuplotRuntime loads Gnuplot and adds enhancements for use in IPython
     34import_all Numeric IPython.numutils IPython.GnuplotInteractive
     35
     36# a simple line at zero, often useful for an x-axis
     37execute xaxis=gpfunc('0',title='',with='lines lt -1')
     38
     39# Below are optional things off by default. Uncomment them if desired.
     40
     41# MA (MaskedArray) modifies the Numeric printing mechanism so that huge arrays
     42# are only summarized and not printed (which may freeze the machine for a
     43# _long_ time).
     44
     45#import_mod MA
     46
     47
     48# gracePlot is a Python interface to the plotting package Grace.
     49# For more details go to: http://www.idyll.org/~n8gray/code/index.html
     50# Uncomment lines below if you have grace and its python support code
     51
     52#import_mod gracePlot
     53#execute grace = gracePlot.gracePlot  # alias to make gracePlot instances
     54#execute print '*** grace is an alias for gracePlot.gracePlot'
     55
     56# Files to execute
     57execfile
  • new file dotsage/ipython/ipythonrc-physics

    diff --git a/dotsage/ipython/ipythonrc-physics b/dotsage/ipython/ipythonrc-physics
    new file mode 100644
    - +  
     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://starship.python.net/crew/hinsen/)
     18
     19# First load basic user configuration
     20include ipythonrc
     21
     22# import ...
     23# Module with alternate input syntax for PhysicalQuantity objects.
     24import_mod IPython.Extensions.PhysicalQInput
     25
     26# from ... import *
     27# math CANNOT be imported after PhysicalQInteractive. It will override the
     28# functions defined there.
     29import_all math IPython.Extensions.PhysicalQInteractive
     30
     31# from ... import ...
     32import_some
     33
     34# code
     35execute q = PhysicalQuantityInteractive
     36execute g = PhysicalQuantityInteractive('9.8 m/s**2')
     37ececute rad = pi/180.
     38execute print '*** q is an alias for PhysicalQuantityInteractive'
     39execute print '*** g = 9.8 m/s^2 has been defined'
     40execute print '*** rad = pi/180  has been defined'
     41
     42# Files to execute
     43execfile
  • new file dotsage/ipython/ipythonrc-pysh

    diff --git a/dotsage/ipython/ipythonrc-pysh b/dotsage/ipython/ipythonrc-pysh
    new file mode 100644
    - +  
     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
     23include ipythonrc
     24
     25############################################################################
     26# Load all the actual syntax extensions for shell-like operation, which live
     27# in the InterpreterExec standard extension.
     28import_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
     40prompt_in1 '\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
     41prompt_in2 '\C_Green|\C_LightGreen\D\C_Green> '
     42prompt_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).
     51prompts_pad_left 1
     52
     53
     54# Remove all blank lines in between prompts, like a normal shell.
     55separate_in 0
     56separate_out 0
     57separate_out2 0
     58
     59# Allow special syntax (!, magics and aliases) in multiline input
     60multi_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
  • new file dotsage/ipython/ipythonrc-scipy

    diff --git a/dotsage/ipython/ipythonrc-scipy b/dotsage/ipython/ipythonrc-scipy
    new file mode 100644
    - +  
     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# This is an example of a 'profile' file which includes a base file and adds
     12# some customizaton for a particular purpose.
     13
     14# If this file is found in the user's ~/.ipython directory as ipythonrc-scipy,
     15# it can be loaded by calling passing the '-profile scipy' (or '-p scipy')
     16# option to IPython.
     17
     18# This example is meant to load several modules to turn ipython into a very
     19# capable environment for high-end numerical work, similar to IDL or MatLab
     20# but with the beauty of the Python language.
     21
     22# load our basic configuration with generic options
     23include ipythonrc
     24
     25# import ...
     26# Load SciPy by itself so that 'help scipy' works
     27import_mod scipy
     28
     29# from ... import ...
     30import_some
     31
     32# Now we load all of SciPy
     33# from ... import *
     34import_all scipy IPython.numutils
     35
     36# code
     37execute print 'Welcome to the SciPy Scientific Computing Environment.'
     38execute scipy.alter_numeric()
     39
     40# File with alternate printer system for Numeric Arrays.
     41# Files in the 'Extensions' directory will be found by IPython automatically
     42# (otherwise give the explicit path):
     43execfile Extensions/numeric_formats.py
  • new file dotsage/ipython/ipythonrc-tutorial

    diff --git a/dotsage/ipython/ipythonrc-tutorial b/dotsage/ipython/ipythonrc-tutorial
    new file mode 100644
    - +  
     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-tutorial, it can be loaded by calling passing the '-profile
     13# tutorial' (or '-p tutorial') option to IPython.
     14
     15# This profile loads a special input line filter to allow typing lines which
     16# begin with '>>> ' or '... '. These two strings, if present at the start of
     17# the input line, are stripped. This allows for direct pasting of code from
     18# examples such as those available in the standard Python tutorial.
     19
     20# First load basic user configuration
     21include ipythonrc
     22
     23# import ...
     24# Module with alternate input syntax for pasting python input
     25import_mod IPython.Extensions.InterpreterPasteInput
     26
     27# from ... import *
     28import_all
     29
     30# from ... import ...
     31import_some
     32
     33# code
     34execute
     35
     36# Files to execute
     37execfile
  • deleted file mirror

    diff --git a/mirror b/mirror
    deleted file mode 100755
    + -  
    1 #!/bin/sh
    2 cd $HOME/sage/web/dist/src/extcode-darcs/
    3 darcs changes > changelog_darcs.txt
    4 echo "uploading"
    5 rsync -axLH --rsh=ssh --delete -r -v  * modular:/home/was/www/sage/dist/src/extcode-darcs
  • deleted file spkg-debian

    diff --git a/spkg-debian b/spkg-debian
    deleted file mode 100755
    + -  
    1 #!/bin/sh -xe
    2 echo "Don't build Debian package for extcode"