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

Data Structures

class  InteractiveInterpreter
 
class  InteractiveConsole
 

Functions

def softspace
 
def interact
 

Variables

list __all__
 

Detailed Description

Utilities needed to emulate Python's interactive interpreter.

Function Documentation

def code.interact (   banner = None,
  readfunc = None,
  local = None 
)
Closely emulate the interactive Python interpreter.

This is a backwards compatible interface to the InteractiveConsole
class.  When readfunc is not specified, it attempts to import the
readline module to enable GNU readline if it is available.

Arguments (all optional, all default to None):

banner -- passed to InteractiveConsole.interact()
readfunc -- if not None, replaces InteractiveConsole.raw_input()
local -- passed to InteractiveInterpreter.__init__()

Definition at line 285 of file code.py.

286 def interact(banner=None, readfunc=None, local=None):
287  """Closely emulate the interactive Python interpreter.
288 
289  This is a backwards compatible interface to the InteractiveConsole
290  class. When readfunc is not specified, it attempts to import the
291  readline module to enable GNU readline if it is available.
292 
293  Arguments (all optional, all default to None):
294 
295  banner -- passed to InteractiveConsole.interact()
296  readfunc -- if not None, replaces InteractiveConsole.raw_input()
297  local -- passed to InteractiveInterpreter.__init__()
298 
299  """
300  console = InteractiveConsole(local)
301  if readfunc is not None:
302  console.raw_input = readfunc
303  else:
304  try:
305  import readline
306  except:
307  pass
308  console.interact(banner)
309 
def code.softspace (   file,
  newvalue 
)

Definition at line 15 of file code.py.

15 
16 def softspace(file, newvalue):
17  oldvalue = 0
18  try:
19  oldvalue = file.softspace
20  except AttributeError:
21  pass
22  try:
23  file.softspace = newvalue
24  except (AttributeError, TypeError):
25  # "attribute-less object" or "read-only attributes"
26  pass
27  return oldvalue

Variable Documentation

list __all__
Initial value:
1 = ["InteractiveInterpreter", "InteractiveConsole", "interact",
2  "compile_command"]

Definition at line 12 of file code.py.