Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
_Printer Class Reference

Public Member Functions

def __init__
 
def __repr__
 
def __call__
 

Static Public Attributes

int MAXLINES = 23
 

Detailed Description

Definition at line 196 of file site.py.

Constructor & Destructor Documentation

def __init__ (   self,
  name,
  data,
  files = (),
  dirs = () 
)

Definition at line 199 of file site.py.

References _Printer.__data, _Printer.__dirs, _Printer.__files, _Printer.__linecnt, _Printer.__lines, _Printer.__name, and aifc.open().

200  def __init__(self, name, data, files=(), dirs=()):
201  self.__name = name
202  self.__data = data
203  self.__files = files
204  self.__dirs = dirs
205  self.__lines = None

Member Function Documentation

def __call__ (   self)

Definition at line 234 of file site.py.

References _Printer.__lines, _Printer.__setup(), and _Printer.MAXLINES.

235  def __call__(self):
236  self.__setup()
237  prompt = 'Hit Return for more, or q (and Return) to quit: '
238  lineno = 0
239  while 1:
240  try:
241  for i in range(lineno, lineno + self.MAXLINES):
242  print self.__lines[i]
243  except IndexError:
244  break
245  else:
246  lineno += self.MAXLINES
247  key = None
248  while key is None:
249  key = raw_input(prompt)
250  if key not in ('', 'q'):
251  key = None
252  if key == 'q':
253  break
254 
__builtin__.copyright = _Printer("copyright", sys.copyright)
def __repr__ (   self)

Definition at line 227 of file site.py.

References _Printer.__lines, _Printer.__name, _Printer.__setup(), dospath.join(), and _Printer.MAXLINES.

228  def __repr__(self):
229  self.__setup()
230  if len(self.__lines) <= self.MAXLINES:
231  return "\n".join(self.__lines)
232  else:
233  return "Type %s() to see the full %s text" % ((self.__name,)*2)

Field Documentation

int MAXLINES = 23
static

Definition at line 197 of file site.py.


The documentation for this class was generated from the following file: