Esempio n. 1
0
def main():   
    
    import sys
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Algorithms')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/CMA')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Experiments')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Utils')
    
    from numpy import *
    from pylab import *
    import scipy as sp
    
    # uncomment if you want to get ipython -p sh behaviour
    # without having to use command line switches  
    # import ipy_profile_sh

    # Configure your favourite editor?
    # Good idea e.g. for %edit os.path.isfile

    import ipy_editors
    ipy_editors.emacs()
    # Choose one of these:
    
    #ipy_editors.scite()
    #ipy_editors.scite('c:/opt/scite/scite.exe')
    #ipy_editors.komodo()
    #ipy_editors.idle()
    # ... or many others, try 'ipy_editors??' after import to see them
    
    # Or roll your own:
    #ipy_editors.install_editor("c:/opt/jed +$line $file")
    
    
    o = ip.options
    # An example on how to set options
    #o.autocall = 1
    o.system_verbose = 0
    
    #import_all("os sys")
    #execf('~/_ipython/ns.py')


    # -- prompt
    # A different, more compact set of prompts from the default ones, that
    # always show your current location in the filesystem:

    #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
    #o.prompt_in2 = r'.\D: '
    #o.prompt_out = r'[\#] '
    
    # Try one of these color settings if you can't read the text easily
    # autoexec is a list of IPython commands to execute on startup
    #o.autoexec.append('%colors LightBG')
    #o.autoexec.append('%colors NoColor')
    #o.autoexec.append('%colors Linux')
    
    # for sane integer division that converts to float (1/2 == 0.5)
    o.autoexec.append('from __future__ import division')
Esempio n. 2
0
def main():

    import sys
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Algorithms')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/CMA')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Experiments')
    sys.path.append('/Users/chris/Dropbox/Work/MacSpyder/Utils')

    from numpy import *
    from pylab import *
    import scipy as sp

    # uncomment if you want to get ipython -p sh behaviour
    # without having to use command line switches
    # import ipy_profile_sh

    # Configure your favourite editor?
    # Good idea e.g. for %edit os.path.isfile

    import ipy_editors
    ipy_editors.emacs()
    # Choose one of these:

    #ipy_editors.scite()
    #ipy_editors.scite('c:/opt/scite/scite.exe')
    #ipy_editors.komodo()
    #ipy_editors.idle()
    # ... or many others, try 'ipy_editors??' after import to see them

    # Or roll your own:
    #ipy_editors.install_editor("c:/opt/jed +$line $file")

    o = ip.options
    # An example on how to set options
    #o.autocall = 1
    o.system_verbose = 0

    #import_all("os sys")
    #execf('~/_ipython/ns.py')

    # -- prompt
    # A different, more compact set of prompts from the default ones, that
    # always show your current location in the filesystem:

    #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
    #o.prompt_in2 = r'.\D: '
    #o.prompt_out = r'[\#] '

    # Try one of these color settings if you can't read the text easily
    # autoexec is a list of IPython commands to execute on startup
    #o.autoexec.append('%colors LightBG')
    #o.autoexec.append('%colors NoColor')
    #o.autoexec.append('%colors Linux')

    # for sane integer division that converts to float (1/2 == 0.5)
    o.autoexec.append('from __future__ import division')
Esempio n. 3
0
def main():

    # uncomment if you want to get ipython -p sh behaviour
    # without having to use command line switches
    # import ipy_profile_sh

    # Configure your favourite editor?
    # Good idea e.g. for %edit os.path.isfile

    import ipy_editors

    # Choose one of these:

    #ipy_editors.scite()
    #ipy_editors.scite('c:/opt/scite/scite.exe')
    #ipy_editors.komodo()
    #ipy_editors.idle()
    # ... or many others, try 'ipy_editors??' after import to see them
    ipy_editors.emacs()

    # Or roll your own:
    #ipy_editors.install_editor("c:/opt/jed +$line $file")

    o = ip.options
    # An example on how to set options
    #o.autocall = 1
    o.system_verbose = 0

    #import_all("os sys")
    #execf('~/_ipython/ns.py')

    # -- prompt
    # A different, more compact set of prompts from the default ones, that
    # always show your current location in the filesystem:

    #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
    #o.prompt_in2 = r'.\D: '
    #o.prompt_out = r'[\#] '

    # Try one of these color settings if you can't read the text easily
    # autoexec is a list of IPython commands to execute on startup
    #o.autoexec.append('%colors LightBG')
    #o.autoexec.append('%colors NoColor')
    #o.autoexec.append('%colors Linux')

    # for sane integer division that converts to float (1/2 == 0.5)
    #o.autoexec.append('from __future__ import division')
    ip.IP.runcode(ip.IP.compile('from __future__ import division'))

    # For %tasks and %kill
    #import jobctrl

    # For autoreloading of modules (%autoreload, %aimport)
    #import ipy_autoreload

    # For winpdb support (%wdb)
    #import ipy_winpdb

    # For bzr completer, requires bzrlib (the python installation of bzr)
    #ip.load('ipy_bzr')

    # Tab completer that is not quite so picky (i.e.
    # "foo".<TAB> and str(2).<TAB> will work). Complete
    # at your own risk!
    #import ipy_greedycompleter

    # If you are on Linux, you may be annoyed by
    # "Display all N possibilities? (y or n)" on tab completion,
    # as well as the paging through "more". Uncomment the following
    # lines to disable that behaviour
    import readline
    readline.parse_and_bind('set completion-query-items 1000')
    readline.parse_and_bind('set page-completions no')
    #print dir(ip)
    #print dir(ip.IP)
    ip.ex('import numpy as np')
    ip.ex('import scipy as sp')
    ip.ex('sp.pkgload()')
    ip.ex('sp.pkgload("scipy.constants")')
    ip.ex('from PyQt4.Qt import *')
    ip.ex('from PyQt4.Qwt5 import *')
    ip.ex('from PyQt4.Qwt5.qplt import *')
    ip.ex('import PyQt4.Qwt5.iqt')
Esempio n. 4
0
def main():   

    # uncomment if you want to get ipython -p sh behaviour
    # without having to use command line switches  
    # import ipy_profile_sh

    # Configure your favourite editor?
    # Good idea e.g. for %edit os.path.isfile

    import ipy_editors
    
    # Choose one of these:
    
    #ipy_editors.scite()
    #ipy_editors.scite('c:/opt/scite/scite.exe')
    #ipy_editors.komodo()
    #ipy_editors.idle()
    # ... or many others, try 'ipy_editors??' after import to see them
    ipy_editors.emacs()
    
    # Or roll your own:
    #ipy_editors.install_editor("c:/opt/jed +$line $file")
    
    
    o = ip.options
    # An example on how to set options
    #o.autocall = 1
    o.system_verbose = 0
    
    #import_all("os sys")
    #execf('~/_ipython/ns.py')


    # -- prompt
    # A different, more compact set of prompts from the default ones, that
    # always show your current location in the filesystem:

    #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
    #o.prompt_in2 = r'.\D: '
    #o.prompt_out = r'[\#] '
    
    # Try one of these color settings if you can't read the text easily
    # autoexec is a list of IPython commands to execute on startup
    #o.autoexec.append('%colors LightBG')
    #o.autoexec.append('%colors NoColor')
    #o.autoexec.append('%colors Linux')
    
    # for sane integer division that converts to float (1/2 == 0.5)
    #o.autoexec.append('from __future__ import division')
    ip.IP.runcode(ip.IP.compile('from __future__ import division'))
    
    # For %tasks and %kill
    #import jobctrl 
    
    # For autoreloading of modules (%autoreload, %aimport)    
    #import ipy_autoreload
    
    # For winpdb support (%wdb)
    #import ipy_winpdb
    
    # For bzr completer, requires bzrlib (the python installation of bzr)
    #ip.load('ipy_bzr')
    
    # Tab completer that is not quite so picky (i.e. 
    # "foo".<TAB> and str(2).<TAB> will work). Complete 
    # at your own risk!
    #import ipy_greedycompleter
    
    # If you are on Linux, you may be annoyed by
    # "Display all N possibilities? (y or n)" on tab completion,
    # as well as the paging through "more". Uncomment the following
    # lines to disable that behaviour
    import readline
    readline.parse_and_bind('set completion-query-items 1000')
    readline.parse_and_bind('set page-completions no')
    #print dir(ip)
    #print dir(ip.IP)
    ip.ex('import numpy as np')
    ip.ex('import scipy as sp')
    ip.ex('sp.pkgload()')
    ip.ex('sp.pkgload("scipy.constants")')
    ip.ex('from PyQt4.Qt import *')
    ip.ex('from PyQt4.Qwt5 import *')
    ip.ex('from PyQt4.Qwt5.qplt import *')
    ip.ex('import PyQt4.Qwt5.iqt')