Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Who's using pyupdate? #1

Open
EvonX opened this issue Feb 4, 2020 · 2 comments
Open

Who's using pyupdate? #1

EvonX opened this issue Feb 4, 2020 · 2 comments

Comments

@EvonX
Copy link
Collaborator

EvonX commented Feb 4, 2020

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
@gkapfham
Copy link

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!

@EvonX
Copy link
Collaborator Author

EvonX commented Aug 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants