pyliveupdate icon indicating copy to clipboard operation
pyliveupdate copied to clipboard

Who's using pyupdate?

Open EvonX opened this issue 5 years ago • 2 comments

Who's using pyupdate?

Thanks sincerely for constantly using and supporting this project. Please comment in this issue if you are using pyupdate!!

Format example:

  • Company: xxx
  • Contact: xxx
  • Purpose: trouble-shoot production issues

EvonX avatar Feb 04 '20 10:02 EvonX

Hello @EvonX I would be interested in using pyupdate. I noticed that the provided example does not show how to use the Instrument even though there is an example of Redefine. Could you please provide an example that shows how to use Instrument so that I can better evaluate the use of this project? Thanks!

gkapfham avatar Aug 19 '22 17:08 gkapfham

Hey @gkapfham, thanks for reaching out! Sure, here is an example for Instrument:

from pyliveupdate.update import Instrument, UpdateManager

def _line_after(a):
    print(a)
    
update = Instrument('__main__.bar', 
                    {('line_after', [12, 14]): _line_after})
UpdateManager.apply_update(update)

Basically, you need to instantiate Instrument to specify a customized instrumentation, and then use UpdateManager to apply it. To instantiate an Instrument, you need to provide scope, jointpoint and payload, etc. Detailed explanation can be found Here.

Hope this helps. Feel free to let me know if you have more questions.

EvonX avatar Aug 22 '22 05:08 EvonX