Metadata-Version: 1.0

Name: SE

Version: 2.3

Summary: A stream editor

Home-page: None

Author: Frederic Rentsch

Author-email: anthra.norell@tiscalinet.ch

License: Open source in expectation of authorship credit

Platform: Any ( pure Python )

Description: A Python stream editor with these characteristics:

   1. Does any (practical) number of search-and-replaces in one pass.
   2. Does any (practical) number of passes in one run.
   3. Handles all 256 octets.
   4. Does regular expressions.
   5. Notational conveniences.
   6. Compiles substitution sets defined in the form of a string.
   7. Compiles substitution sets edited and kept in text files.
   8. Naming a file in a definition string inserts the file's contents in 
      the place of its name, making for a modular building-block system.
   9. Naming files is recursive. Files may pull in other files.
  10. Constructor compiles definitions into an Editor object that will
      translate any input.
  11. Accepts input as string, file object or file by name. Outputs any of
      these types, matching type by default.
  12. Overwrite-safe. In-place edits switch name only and keep original data
      with a backup extension.
  13. Method set () to change runtime parameters.
  14. Method show () for object inspection.
  15. Methods save (), add (), drop () and reverse () for interactive edits.
  16. Optional retention and display of intermediate data with chained passes.
  17. Method show_log () displays a list of accumulated glitches and potential 
      glitches, mainly about IO operations.
  18. A Light version (SEL) without interaction except for set () and 
      show_log ().
  19. Method se.SEL () returns a light version of se. Constructor SE.SE (sel) 
      takes a Light editor object instead of substitutions and makes an
      interactive one from it.
  20. An extensive manual: SE-DOC.HTM.
  21. An example definition file: htm2iso.se. Converts htm-ampersand escapes 
      to characters.
  22. A demo script going through the examples in the doc.


---------------------------------------------------------------------------------


Name: FORMEX

Version: 1.0

Summary: A Formula Expander

Home-page: None

Author: Frederic Rentsch

Author-email: anthra.norell@tiscalinet.ch

License: Open source in expectation of authorship credit

Platform: Any ( pure Python )

Description: A derivation from SE making use of translation cascades. Expands
mathematical formulas like this:

   >>> pipeline = FORMEX.Formula_Expander ('''
       diameter=3,
       ft_per_second=4.075,
       volume_per_second=section*ft_per_second,
       gallons_per_hour=volume_per_second*3600*gallons_per_ft3''')
   >>> pipeline ('gallons_per_hour')
   Cannot evaluate ((section*4.075)*3600*gallons_per_ft3)

   'section' and 'gallons_per_ft3' are unresolved non-terminals.

   >>> pipeline.define ('section=r*r*pi, gallons_per_ft3=9.34')
   >>> pipeline ('gallons_per_hour')
   Cannot evaluate (((r*r*pi)*4.075)*3600*(9.34))

   'r' and 'pi' are unresolved non-terminals.

   >>> pipeline.define ('r=diameter/2.0, pi=3.14')
   >>> pipeline ('gallons_per_hour')
   968030.75699999998

   >>> pipeline.define ('pi = "math.pi"')  # Overwrite. Double-quote environment-defined terminals
   >>> pipeline.expand ('gallons_per_hour')
   '(((((3)/2.0)*((3)/2.0)*(math.pi))*(4.075))*3600*(9.34))'

   >>> pipeline.set (keep_cascade = 1)  # Prepare cascade display
   >>> pipeline ('gallons_per_hour')
   968521.75625482993

   >>> pipeline.show ()

   (... snip...)

   Translation Cascade
   ----------------------------------------------------------------------------------
     gallons_per_hour
   0 --------------------------------------------------------------------------------
     (volume_per_second*3600*gallons_per_ft3)
   1 --------------------------------------------------------------------------------
     ((area*ft_per_second)*3600*gallons_per_ft3)
   2 --------------------------------------------------------------------------------
     (((r*r*pi)*ft_per_second)*3600*gallons_per_ft3)
   3 --------------------------------------------------------------------------------
     ((((diameter/2.0)*(diameter/2.0)*(math.pi))*ft_per_second)*3600*gallons_per_ft3)
   4 --------------------------------------------------------------------------------
     (((((3)/2.0)*((3)/2.0)*(math.pi))*(4.075))*3600*(9.34))
   ----------------------------------------------------------------------------------
