Closed villares closed 2 years ago
For both of them you need to call py5.exit_sketch()
for the Sketch to exit and for the output to be written. Is this different from how Processing and Processing.py works?
For both of them you need to call
py5.exit_sketch()
for the Sketch to exit and for the output to be written. Is this different from how Processing and Processing.py works?
Hmmm, interesting! I have not found about the need for an "exit call" in the processing.org size()
reference:
https://processing.org/reference/size_.html
https://py.processing.org/reference/size.html
But then... there it is in this PDF library page!
So I suppose it is "works as designed" :)
Suggestion:
size()
reference page and be done with it?The documentation could be more clear about the need for exit()
. It is mentioned explicitly at the very end:
Again, exit() is really important when using PDF with size().
We could mention this in py5's size()
reference page. I'm not sure what you mean by a post exit clean up routine. Post exit is after exit, and there is no longer a need to call exit_sketch()
then. Do you mean have py5 call exit for you? I don't know if that's a good idea, we'd have to think that through to make sure there are no bad side effects.
Yeah, precise language can be tricky for describing it... I meant something that could execute after a sketch ends if exit_sketch()
is not called to guarantee things are closed properly. But I see it could be hard.
I vote to just close this with a mention added to the size()
page for now.
I vote to just close this with a mention added to the
size()
page for now.
Yes, I think that's the right thing to do here. Would you like to make a PR for this change?
Oh... Sorry, could you point me for the n-th time to te instructions for building/contributing to the docs?
On Sun, 21 Aug 2022, 21:56 hx2A, @.***> wrote:
I vote to just close this with a mention added to the size() page for now.
Yes, I think that's the right thing to do here. Would you like to make a PR for this change?
— Reply to this email directly, view it on GitHub https://github.com/py5coding/py5generator/issues/137#issuecomment-1221667068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4GADCZY3VJG673IK6TJVDV2LF3XANCNFSM57FUGQJA . You are receiving this because you authored the thread.Message ID: @.***>
No problem. You need to submit a PR for a change to this file, adding a sentence or two to the @@ description
section.
This fixed and I merged the PR. Thank you!
console:
0.8.2.dev0
file output: A zero-bytes out.pdf file.
console:
0.8.2.dev0
file output: