-
Notifications
You must be signed in to change notification settings - Fork 291
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
suppress_stdout_stderr seems to suppress to much #31
Comments
Comment by fragmuffin It seems strange that you're missing messages before you run the exporter.
totally agree 👍. Those wacky FreeCAD people! |
Comment by gntech
Yes, this is what I think as well. It is bad since I want to use the print statements to show progress of the script. And the buffering makes all the print come at the very end of the script run, so much for progress. :) |
Comment by gntech I found a possible solution to the problem that freecad buffers everything that is written to stdout until the end of execution.
See https://forum.freecadweb.org/viewtopic.php?f=22&t=28354&hilit=Step+stdout |
Comment by dcowden ...or we could just accelerate progress to pull in @adam-urbanczyk 's OCC branch and convert this function to use OCC directly and just skip freecad. that'd be my vote. Last I checked his branch had just about everything working without FreeCAD. I think we should start pulling in his branch, and then start slowly converting CQ functions to use OCC directly, initially, using the OCC bundled with FreeCAD. |
Comment by fragmuffin @gntech
That's exciting! @adam-urbanczyk is it time to start migrating |
Comment by dcowden @adam-urbanczyk @fragmuffin it is definitely close enough i think its time to try to make it happen. I think he reported having all of the tests passing at the time even. Our test coverage is pretty good, so I think that means we're pretty close. I've created #268 to get the ball rolling on that. |
This is a FreeCAD issue, so I'm closing it. I put an issue on the FreeCAD workbench repo since it is the only place the old CadQuery 1.x library is still being maintained, although at a very minimal level. |
Issue by gntech
Wednesday May 16, 2018 at 17:40 GMT
Originally opened as dcowden/cadquery#267
When exporting a STEP-file cadquery swallows some of the things written to stdout.
Consider the following script. Run from terminal with python.
I would expect to get to get 3 print statements but I only get the last one
after exporting model
I suspect that this has something to with the function suppress_stdout_stderr that is designed to suppress some messages from freecad regarding the step-export.
If I run the script like so instead I get all 3 print statments but also some messages from freecad regarding step creation. Using this form of the export I bypass the suppress_stdout_stderr()
My suggestion for how to fix this issue is to contact freecad upstream to see if we can get a clean step output from freecad to get rid of suppress_stdout_stderr. Because, seriously, the suppress_stdout_stderr() is not the ideal solution. :)
The text was updated successfully, but these errors were encountered: