Content-type: text/html
Man page of OCULAR
OCULAR
Section: Users manual (1)
Updated: NOVEMBER 2006
Index
Return to Main Contents
NAME
ocular - a python spreadsheet
SYNTAX
ocular
DESCRIPTION
ocular
is the brand new linux spreadsheet written in
100% pure python. Every cell is first checked for any
standard spreadsheet coordinates, and then evaluated by
python. Future roadmap is readable from the file 'todo'.
Coordinates work just as in most spreadsheets. Use [letter][number] for
coordinates relative to the containing cell; prefix them with $ to fix it.
These coordinates are internally parsed to an expression python understands.
For example
-
1/(2*sqrt(pi)) * exp(-D0**2)
in cell E0 will become
-
1/(2*sqrt(pi)) * exp(-data[18][3].eval([[0,4]]))
If you then select cells E0 to E30 and press <e>, E19 will
contain the expression:
-
1/(2*sqrt(pi)) * exp(-D19**2)
and so on. If you then select columns D and E and press <P>
the values found by python (clearly visible on your display)
will be send to Gnuplot, and a nice Gaussian might appear.
Sorting rows will destroy any logic in relative coordinates.
If you sort any thing with vertical structure, make sure
you first 'literalise' the content. To illustrate the dynamics of
ocular
here's an example of how to do this.
-
press
<p>,
The prompt will change to
-
python>
Then do something like:
-
for i in data[2:20]: i[2].expression = i[2].value
To 'literalise' the third column in rows #2 to 19.
This shows very well how this spreadsheet works. Maybe
this will be put into a shorthand function some day :)
KEYBOARD
- p
-
give python command (coordinates are NOT parsed!)
- P
-
plot selection
- del
-
clear selection
- enter
-
edit current cell
- u
-
recalculate (update)
- C-r
-
read-in from file
- C-o
-
write-out to file
- s
-
sort selected rows
- e
-
equate contents of current cel with rest of selection (TIY!)
- m
-
move some selection to other location
- n
-
clear all cells (new)
- <cursors> h l j k
-
move the selector
- H L J K
-
select a range of cells (the rxvt and xterm keycodes for S-<cursors> are different, and terminfo does not have entries for these)
COMMAND
- insert_col(n=1)
-
insert column
- insert_row(n=1)
-
insert row
or any thing in python (also import)
LINE EDITOR
The line editor is pretty obvious. Cursor keys, <C-a> <C-k> <C-e> <BS> <del> and <CR> do things you expect them to.
BUGS
still plenty. Known bugs are listed in the
todo
file, which can be read using
ocular.
Press
C-r
, then type
todo <enter>.
AUTHOR
Johan Hidding <hidding at astro dot rug dot nl>
SEE ALSO
python(1)
Index
- NAME
-
- SYNTAX
-
- DESCRIPTION
-
- KEYBOARD
-
- COMMAND
-
- LINE EDITOR
-
- BUGS
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 21:39:56 GMT, November 16, 2006