GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Static Public Attributes
pycons.console.ConsoleIn Class Reference

Public Member Functions

 __init__ (self, console, fn=-1)
 
 close (self)
 
 fileno (self)
 
 isatty (self)
 
 read (self, a)
 
 readline (self)
 
 readlines (self)
 
 write (self, s)
 
 writelines (self, l)
 
 seek (self, a)
 
 tell (self)
 

Data Fields

 fn
 
 console
 

Static Public Attributes

 flush = close
 
 truncate = tell
 

Detailed Description

A fake input file object.  It receives input from a GTK TextView widget,
and if asked for a file number, returns one set on instance creation

Definition at line 91 of file console.py.

Constructor & Destructor Documentation

◆ __init__()

pycons.console.ConsoleIn.__init__ (   self,
  console,
  fn = -1 
)

Definition at line 96 of file console.py.

96 def __init__(self, console, fn=-1):
97 self.fn = fn
98 self.console = console

Member Function Documentation

◆ close()

pycons.console.ConsoleIn.close (   self)

Definition at line 99 of file console.py.

99 def close(self): pass

◆ fileno()

pycons.console.ConsoleIn.fileno (   self)

Definition at line 101 of file console.py.

101 def fileno(self): return self.fn

◆ isatty()

pycons.console.ConsoleIn.isatty (   self)

Definition at line 102 of file console.py.

102 def isatty(self): return False

◆ read()

pycons.console.ConsoleIn.read (   self,
  a 
)

Definition at line 103 of file console.py.

103 def read(self, a): return self.readline()

◆ readline()

pycons.console.ConsoleIn.readline (   self)

Definition at line 104 of file console.py.

104 def readline(self):
105 self.console.input_mode = True
106 buffer = self.console.buffer
107 #console.write('\n')
108 iter = buffer.get_iter_at_mark(buffer.get_insert())
109 buffer.move_mark (buffer.get_mark('linestart'), iter)
110 while self.console.input_mode:
111 #while Gtk.events_pending():
112 Gtk.main_iteration()
113 s = self.console.input
114 self.console.input = ''
115 return s+'\n'

◆ readlines()

pycons.console.ConsoleIn.readlines (   self)

Definition at line 116 of file console.py.

116 def readlines(self): return []

◆ seek()

pycons.console.ConsoleIn.seek (   self,
  a 
)

Definition at line 119 of file console.py.

119 def seek(self, a): raise IOError(29, 'Illegal seek')

◆ tell()

pycons.console.ConsoleIn.tell (   self)

Definition at line 120 of file console.py.

120 def tell(self): raise IOError(29, 'Illegal seek')

◆ write()

pycons.console.ConsoleIn.write (   self,
  s 
)

Definition at line 117 of file console.py.

117 def write(self, s): return None

◆ writelines()

pycons.console.ConsoleIn.writelines (   self,
  l 
)

Definition at line 118 of file console.py.

118 def writelines(self, l): return None

Field Documentation

◆ console

pycons.console.ConsoleIn.console

Definition at line 98 of file console.py.

◆ flush

pycons.console.ConsoleIn.flush = close
static

Definition at line 100 of file console.py.

◆ fn

pycons.console.ConsoleIn.fn

Definition at line 97 of file console.py.

◆ truncate

pycons.console.ConsoleIn.truncate = tell
static

Definition at line 121 of file console.py.


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