Package pyraf :: Module tpar
[hide private]
[frames] | no frames]

Module tpar

source code

module 'tpar.py' -- main module for generating the tpar task editor

tpar is curses based parameter editing similar to epar. Tpar has the primary goal of simplicity similar to IRAF's CL epar and as such is missing many PyRAF epar features. The primary advantage of tpar is that it works in a simple terminal window (rather than requiring full X-11 and Tk); this is an improvement for low bandwidth network contexts or for people who prefer text interfaces to GUIs.

$Id: tpar.py 1194 2010-05-14 17:57:37Z sontag $

Todd Miller, 2006 May 30 derived from epar.py and IRAF CL epar.

Classes [hide private]
  FakeModule
  FakeClass
  Binder
The Binder class manages keypresses for urwid and adds the ability to bind specific inputs to actions.
  PyrafEdit
PyrafEdit is a text entry widget which has keybindings similar to IRAF's CL epar command.
  StringTparOption
  NumberTparOption
  BooleanTparOption
  EnumTparOption
  PsetTparOption
  TparHeader
  TparDisplay
Functions [hide private]
 
tpar(taskName) source code
Variables [hide private]
  URWID_PRE_9P9 = False
  TPAR_HELP_EMACS = ' EDIT COMMAN...
  TPAR_BINDINGS_EMACS = {'ctrl A': 'move_bol', 'ctrl B': 'left',...
  TPAR_HELP_VI = ' EDIT COMMANDS ...
  TPAR_BINDINGS_VI = {'ctrl A': 'move_bol', 'ctrl B': 'prev_word...
  __package__ = 'pyraf'

Imports: os, sys, string, commands, re, urwutil, urwfiledlg, urwid, iraf, irafpar, irafhelp, iraftask, cStringIO, iraffunctions


Variables Details [hide private]

TPAR_HELP_EMACS

Value:
'''                                EDIT COMMANDS (emacs)

           DEL_CHAR   = DEL                    MOVE_RIGHT = RIGHT_ARRO\
W
           DEL_LEFT   = ^H_or_BS               MOVE_RIGHT = ^F
           DEL_LINE   = ^K                     MOVE_START = ESC-<
           DEL_WORD   = ESC-D                  MOVE_UP    = UP_ARROW
           DEL_WORD   = ESC-d                  MOVE_UP    = ^P
...

TPAR_BINDINGS_EMACS

Value:
{'ctrl A': 'move_bol',
 'ctrl B': 'left',
 'ctrl C': 'quit',
 'ctrl D': 'exit',
 'ctrl E': 'move_eol',
 'ctrl F': 'right',
 'ctrl K': 'del_line',
 'ctrl N': 'down',
...

TPAR_HELP_VI

Value:
'''                                EDIT COMMANDS (vi)

           DEL_CHAR   = BACKSPACE              MOVE_LEFT  = ^H
           DEL_LEFT   = DEL                    MOVE_RIGHT = RIGHT_ARRO\
W
           DEL_LINE   = ^I^D                   MOVE_RIGHT = ^L
           DEL_WORD   = ^I^W                   MOVE_START = ^T^S
           EXIT_NOUPD = ^C                     MOVE_UP    = UP_ARROW
...

TPAR_BINDINGS_VI

Value:
{'ctrl A': 'move_bol',
 'ctrl B': 'prev_word',
 'ctrl C': 'quit',
 'ctrl D': 'exit',
 'ctrl E': 'move_eol',
 'ctrl H': 'left',
 'ctrl J': 'down',
 'ctrl K': 'up',
...