Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #7789

The user has found that calling using ImageShow from within a .pyw file on Windows causes a console to appear, as a result of calling os.system from Viewer.

os.system(self.get_command(path, **options)) # nosec

The user has suggested calling subprocess with the CREATE_NO_WINDOW flag to fix this.
https://stackoverflow.com/questions/58943289 / https://stackoverflow.com/a/7006424/4093019 agree with this solution.

Because subprocess.CREATE_NO_WINDOW only exists on Windows, I've added a dedicated WindowsViewer show_file() method for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Showing an image opens a console

2 participants