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

[Feature-Request] Detect computers running macOS as interactive #958

Closed
wvauclain opened this issue Feb 28, 2023 · 2 comments · Fixed by #1110
Closed

[Feature-Request] Detect computers running macOS as interactive #958

wvauclain opened this issue Feb 28, 2023 · 2 comments · Fixed by #1110
Assignees
Labels
enhancement New feature or request

Comments

@wvauclain
Copy link

wvauclain commented Feb 28, 2023

Start with the why:

Some developers have mac computers and want to view visualizations.

Move to the what:

When running an example like the following on macOS, no windows currently pop up:

from depthai_sdk import OakCamera

with OakCamera() as oak:
    cam = oak.create_camera('color')
    oak.visualize(cam.out.main)
    oak.start(blocking=True)

On the other hand, if you run the program while defining the DISPLAY environment variable to a dummy value, it works.

Move to the how:

The current criteria for an interactive computer is linked below:

IS_INTERACTIVE = 'DISPLAY' in os.environ or os.name == 'nt'

This check needs to be updated to include macOS alongside nt, since recent versions of macOS do not include an X11 server, so the DISPLAY environment variable is no longer set by default. I believe the OS name is darwin but would have to double-check that.

@wvauclain wvauclain added the enhancement New feature or request label Feb 28, 2023
@themarpe
Copy link
Collaborator

@wvauclain

If you have an idea in mind / a fix that handles your case, feel free to submit a PR. Will help bringing this in & fixing

@Erol444 Erol444 linked a pull request Sep 1, 2023 that will close this issue
@Erol444
Copy link
Member

Erol444 commented Sep 1, 2023

1.13 SDK contains refactors for visualizers, so this should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants