General KERNEL Documentation     End User KERNEL Services  


pythfilter Namespace Reference


Functions

def output
def rec_name_n_param
def start_recording
def is_recording_finished
def gather_comment
 Gather comment block.
def print_comment
 Output comment block and empty buffer.
def set_state
def get_state
def push_state
def pop_state
def tok_eater
def dump
def filter
def filterFile
def preparePath
def isNewer
def convert

Variables

int OUTSIDE = 0
int BUILD_COMMENT = 1
int BUILD_CLASS_DECL = 2
int BUILD_CLASS_BODY = 3
int BUILD_DEF_DECL = 4
int BUILD_DEF_BODY = 5
int IMPORT = 6
int IMPORT_OP = 7
int IMPORT_APPEND = 8
 outfile = sys.stdout
list outbuffer = []
int out_row = 0
int out_col = 0
string name = ""
string param = ""
string doc_string = ""
int record_state = 0
int bracket_counter = 0
tuple class_spos = (0,0)
tuple def_spos = (0,0)
tuple import_spos = (0,0)
string import_token = ""
list comment_block = []
int comment_finished = 0
list modules = []
list stateStack = [OUTSIDE]
 module_has_docstring = False
string protection_level = "public"
 private_member = False
string namespace = ""
 filter_file = False
 filter_file = True
tuple filename = string.join(args)
tuple c = convert(args[0],args[1])


Function Documentation

def pythfilter::output   s,
  spos,
  immediate = 0
 

def pythfilter::rec_name_n_param   type,
  tok
 

def pythfilter::start_recording  ) 
 

def pythfilter::is_recording_finished  ) 
 

def pythfilter::gather_comment   type,
  tok,
  spos
 

def pythfilter::print_comment   spos  ) 
 

def pythfilter::set_state   s  ) 
 

def pythfilter::get_state  ) 
 

def pythfilter::push_state   s  ) 
 

def pythfilter::pop_state  ) 
 

def pythfilter::tok_eater   type,
  tok,
  spos,
  epos,
  line
 

def pythfilter::dump   filename  ) 
 

def pythfilter::filter   filename  ) 
 

def pythfilter::filterFile   filename,
  out = sys.stdout
 

def pythfilter::preparePath   path  ) 
 

Prepare a path.

Checks if the path exists and creates it if it does not exist.

def pythfilter::isNewer   file1,
  file2
 

Check if file1 is newer than file2.

file1 must be an existing file.

def pythfilter::convert   srcpath,
  destpath
 

Convert a Python source tree into a C+ stub tree.

All *.py files in srcpath (including sub-directories) are filtered
and written to destpath. If destpath exists, only the files
that have been modified are filtered again. Files that were deleted
from srcpath are also deleted in destpath if they are still present.
The function returns the number of processed *.py files.


Variable Documentation

int pythfilter::OUTSIDE = 0 [static]
 

int pythfilter::BUILD_COMMENT = 1 [static]
 

int pythfilter::BUILD_CLASS_DECL = 2 [static]
 

int pythfilter::BUILD_CLASS_BODY = 3 [static]
 

int pythfilter::BUILD_DEF_DECL = 4 [static]
 

int pythfilter::BUILD_DEF_BODY = 5 [static]
 

int pythfilter::IMPORT = 6 [static]
 

int pythfilter::IMPORT_OP = 7 [static]
 

int pythfilter::IMPORT_APPEND = 8 [static]
 

pythfilter::outfile = sys.stdout [static]
 

list pythfilter::outbuffer = [] [static]
 

int pythfilter::out_row = 0 [static]
 

int pythfilter::out_col = 0 [static]
 

string pythfilter::name = "" [static]
 

string pythfilter::param = "" [static]
 

string pythfilter::doc_string = "" [static]
 

int pythfilter::record_state = 0 [static]
 

int pythfilter::bracket_counter = 0 [static]
 

tuple pythfilter::class_spos = (0,0) [static]
 

tuple pythfilter::def_spos = (0,0) [static]
 

tuple pythfilter::import_spos = (0,0) [static]
 

string pythfilter::import_token = "" [static]
 

list pythfilter::comment_block = [] [static]
 

int pythfilter::comment_finished = 0 [static]
 

list pythfilter::modules = [] [static]
 

list pythfilter::stateStack = [OUTSIDE] [static]
 

pythfilter::module_has_docstring = False [static]
 

string pythfilter::protection_level = "public" [static]
 

pythfilter::private_member = False [static]
 

string pythfilter::namespace = "" [static]
 

pythfilter::filter_file = False [static]
 

pythfilter::filter_file = True [static]
 

tuple pythfilter::filename = string.join(args) [static]
 

tuple pythfilter::c = convert(args[0],args[1]) [static]