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
using animation.save with ffmpeg writer after compiling with py2exe opens command prompt #4021
Comments
@jbmohler Any ideas? |
https://stackoverflow.com/questions/24130623/using-python-subprocess-popen-cant-prevent-exe-stopped-working-prompt and links there in. Basically windows is broken. |
I wonder what happens if we add that |
I'll be happy to test it |
Are you able to just modify the source for matplotlib to test? If so, just change lib/matplotlib/animation.py line 190-192 from:
to
Or would it be easier for me to just make a PR--could you test that? |
I'm pretty sure I can edit it. I tried to do so very briefly, but didn't know where to look -- now I have that piece (thanks!). I don't have git setup for matplotlib, so I think it will be easier for me to just make the change manually and report back. |
that seems to have fixed it, @dopplershift thanks! |
Alright, then I'll open up a PR to do so in our code. |
This tells Windows not to create a new window when using Subprocess to save an animation.
Alright, PR is up for anyone who wants to give it a test. @kjgregory can you confirm that this mimics what worked for you? |
Should be closed by #4041. Re-open if that's not the case. |
I'm using animation.save with ffmpeg as my writer in a wxPython widget and it works great when I run it with python. However, when I compile it into an executable for windows using py2exe, it still works but it opens a command prompt everytime. It still encodes my video correctly and everything works fine, but I'd like to suppress the command prompt. I'm not really sure why this is happening, so not sure how to suppress it. Here is a snippet of my code:
FWIW, I had a similar problem with running ffplay using subprocess.Popen() and I solved it by setting 'creationflags=subprocess.CREATE_NO_WINDOW' (0x08000000).
The text was updated successfully, but these errors were encountered: