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  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: sending pickled python objects of epics channel access
From: Matt Newville <newville@cars.uchicago.edu>
To: "Madden, Timothy J." <tmadden@aps.anl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 15 May 2017 17:20:00 -0500
Hi Tim,



On Mon, May 15, 2017 at 5:00 PM, Madden, Timothy J. <tmadden@aps.anl.gov> wrote:

Folks

This is probably a bad idea... But if I were to take a python object, call pickle.dumps() to convert it into a string, I

could then caput it to a waveform record. Then some other py client could caget, then call pickle.loads() from the

waveform record. then we get the object back.  So we are sending python objects over epics CA.


Has anyone tried this? Seems straightforward. Just how bad an idea is this?


There are a couple of potential problems with this approach:

      a) some Python objects cannot be easily pickled / unpickled.  Any object with a method would be in this category.
      b) the details of a pickled object can vary with Python version.

I think the better approach would be to convert the object to json and send that over the wire.  Well, and decide whether CA is the preferred Python-to-Python communication method ;).

--Matt


References:
sending pickled python objects of epics channel access Madden, Timothy J.

Navigate by Date:
Prev: sending pickled python objects of epics channel access Madden, Timothy J.
Next: Re: sending pickled python objects of epics channel access Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: sending pickled python objects of epics channel access Madden, Timothy J.
Next: Re: sending pickled python objects of epics channel access Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 15 May 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·