question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use callbacks.py

See original GitHub issue

Hi, I am unable to get output from callbacks.py. I modified callbacks.py and run depthai_demo.py. Demo is running but I am getting no output/prints I placed in callbacks.py . Please provide an use case. This is how my callbacks.py looks like

def onNewFrame(frame, source):
    print("-------------on new frame----------")


def onShowFrame(frame, source):
    print("-------------onShowFrame----------")


def onNn(nn_packet):
    print("-------------onNn----------")


def onReport(report):
    print("-------------onReport----------")


def onSetup(*args, **kwargs):
    print("-------------onSetup----------")


def onTeardown(*args, **kwargs):
    print("-------------onTeardown----------")


def onIter(*args, **kwargs):
    print("-------------oniter----------")

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Erol444commented, Jun 7, 2022

Hello @iam-shanmukha , great that you got it working with QT GUI! Regarding working with CV GUI - we are a bit short on engineering resources, but I will add this as a FeatureRequest on this repo. Thanks!

0reactions
iam-shanmukhacommented, Jun 7, 2022

reminder 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Callback Function
Example 1: Callback Function ... In this example, we will define a function named printFileLength() that takes file path and callback functions as...
Read more >
Understanding CallBacks using Python Part 1 | Analytics Vidhya
To start with, Callbacks are functions that are sent to another function as an argument. Lets straight away dive into code to understand...
Read more >
python - How to write a simple callback function?
Solution · 1. Good idea to pass the two args before the call back to make the interpreter do some work for you!...
Read more >
Callback functions in Python - A Complete Overview - AskPython
When one function is called from another function it is known as a callback. A callback function is a function that is passed...
Read more >
Callback function in Python - Java2Blog
You can use a callback function in python whenever you need to do extra work before performing some operation. To do the extra...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found