Difference between revisions of "ICalico"

From IPRE Wiki
Jump to: navigation, search
(Display Functions)
Line 55: Line 55:
These are available from the '''calico''' object:
These are available from the '''calico''' object:
* display(...)
* display(item[, item]*) - display one or more items to the notebook output area
* Audio()
* Audio(URI)
* HTML()
* HTML(string)
* Javascript()
* Javascript(string)
* Latex()
* Latex(string)
* Math()
* Math(string)
* Table()
* Table()
* Image()
* Image(URI)
* YouTubeVideo(id, width, height)
* IFrame(src)
  calico.display(calico.HTML("<b>This is bold!</b>"))
  calico.display(calico.HTML("<b>This is bold!</b>"))

Revision as of 16:54, 17 March 2014

ICalico is a new method of interacting with Calico. In addition, a host of new functionality is available.


  1. Install IPython version 2.0.0 or greater
  2. Install Calico version 3.0.0 or greater
  3. Create a profile
    • cd Calico
    • StartCalico --create-profile
    • (If you move Calico, you will have to re-create the profile)
  4. Start IPython with Calico profile
    • ipython notebook --profile calico

A web page should open up which will allow you to enter scripts and Calico "magic" commands (see below).

Getting Started

For an introduction to this manner of interacting with programs, please see:



Technically, ICalico is a "IPython kernel". However, of course ICalico can operating using any of a number of languages.


ICalico magics are "meta" commands: commands for the ICalico system, separate from any Calico language.

  • One preceding percent sign indicates a "magic line command" (applies to just the line)
  • Two preceding percent signs indicates a "magic cell command" (applies to just the cell)
  • Three preceding percent sign indicates a "magic notebook command" (applies from here to rest of notebook)

Any cell can have any number of magic commands, but they must all appear first, before any code.

%connect_info       - show ICalico JSON connection information
%edit FILENAME      - edit a file in an external editor
%%file FILENAME     - create a filename with contents of cell
%%html              - treat the cell as HTML
%lang               - get information on current language
%%lang LANGUAGE     - change language for just this cell
%%%lang LANGUAGE    - change language for rest of cells
%magic              - get information on magic meta-commands
%qtconsole          - start a qtconsole
%run FILENAME       - run a file (language determined by extension)
%%time              - time how long it takes to run this cell

Display Functions

These are available from the calico object:

  • display(item[, item]*) - display one or more items to the notebook output area
  • Audio(URI)
  • HTML(string)
  • Javascript(string)
  • Latex(string)
  • Math(string)
  • Table()
  • Image(URI)
  • YouTubeVideo(id, width, height)
  • IFrame(src)


calico.display(calico.HTML("<b>This is bold!</b>"))


Widgets allow for creating interactive interfaces, when connected to an executing kernel. All of the widgets are available from the calico object.

  • BoundedFloatTextWidget
  • BoundedIntTextWidget
  • ButtonWidget
  • CameraWidget
  • CheckboxWidget
  • ContainerWidget
  • DropdownWidget
  • FloatProgressWidget
  • FloatSliderWidget
  • FloatTextProgressWidget
  • FloatTextWidget
  • HTMLWidget
  • ImageWidget
  • IntProgressWidget
  • IntSliderWidget
  • IntTextWidget
  • LatexWidget
  • PasswordWidget
  • PopupWidget
  • RadioButtonsWidget
  • SelectWidget
  • SelectionWidget
  • TextWidget
  • TextareaWidget
  • ToggleButtonWidget
  • ToggleButtonsWidget

In addition, there are a number of similar Javascript-based widgets:

  • GeoChart