EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Announce: pyexpander - a macro processor also capable of replacing msi
From: Goetz Pfeiffer <[email protected]>
To: EPICS tech-talk <[email protected]>
Date: Fri, 17 Jun 2011 11:10:48 +0200
Hello EPICS community,

I would like to announce pyexpander, a powerful macro processor based
on python. Instead of simple macro replacement it offers evaluation of
arbitrary python expressions and execution of python code.

It can also be used as an replacement for the EPICS msi tool.

Here is a link to the documentation:
http://pyexpander.sourceforge.net/

Here is the download link:
https://sourceforge.net/projects/pyexpander/files/

And here is the command to clone the repository:

hg clone
http://pyexpander.hg.sourceforge.net:8000/hgroot/pyexpander/pyexpander

This is the sourceforge project page:
https://sourceforge.net/projects/pyexpander/

Here is a short example how pyexpander can be used as a replacement for msi:

$template("adimovhgbl.template")\
$subst(
        DESCVAR="adimovhgbl_ins.mac",
        GBASE="U3IV:",
        DRV="V",
        AdiMopVer="9",
        TRIG1="U3IV:AdiVGblPvr.PROC",
        TRIG2="U3IV:AdiVGblMvr.PROC",
)\
$subst(
        DESCVAR="adimovhgbl_ins.mac",
        GBASE="U3IV:",
        DRV="H",
        AdiMopVer="9",
        TRIG1="U3IV:AdiHGblPvr.PROC",
        TRIG2="U3IV:AdiHGblMvr.PROC",
)\
$pattern(
          ("GBASE","DRV","AdiMopVer","TRIG1","TRIG2"),
          ("U3IV","C","9","U3IV:AdiCGblPvr.PROC", "U3IV:AdiCGblMvr.PROC"),
          ("U3IV","P","9","U3IV:AdiPGblPvr.PROC", "U3IV:AdiPGblMvr.PROC"),
)\
$template("adimogbl.template")\
$subst(
        DESCVAR="adimogbl_ins.mac",
        GBASE="U3IV:",
        TRIG1="U3IV:AdiMoVGblTrg.PROC",
        TRIG2="U3IV:AdiMoHGblTrg.PROC",
        TRIG3="",
        TRIG4="",
)\

Features of the package are:

* simple syntax definition, all expander commands start with a dollar ("$")
  sign followed by word characters, parameters or python code enclosed in
  brackets or both.
* the full power of the python programming language can be used, all
operators,
  functions and modules.
* any python expression can be used to insert text.
* There is also a python library, pyexpander.py, which you can use to
develop
  other macro tools based on pyexpander.

Greetings

  Goetz Pfeiffer


________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
Re: Announce: pyexpander - a macro processor also capable of replacing msi Andrew Johnson

Navigate by Date:
Prev: Re: AreaDetector: Prosilica camera on different subnet? Bob Gunion
Next: Re: Announce: pyexpander - a macro processor also capable of replacing msi Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Creating an IOCs and CA cleints for beginners Eric Norum
Next: Re: Announce: pyexpander - a macro processor also capable of replacing msi Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·