On Fri, Jan 20, 2017 at 10:34 AM Christopher Evans <[email protected]> wrote:
> https://github.com/chrisevans3d/mayaTaskServer > > It's on github here, I am no master of python, I have written one of these > at a previous company, but I used RPYC for distributed computing and a > 'task finished' signal coupled with a timeout to know when something > crashed. I would now like to parse the stdout in realtime and also print it > to each worker tab in the UI in realtime to give someone an idea why it > crashed. > Are you talking about this bit of code? https://github.com/chrisevans3d/mayaTaskServer/blob/master/serverUtils.py#L59 Currently you are calling Popen without piping the stdout/stderr anywhere so it would go to the console or default output location. I see you have commented out an attempt to pipe stdout, but you don't have any code that actually uses it. If you are looking to capture stdout as the application is running (that is, without waiting for mayapy to exit before getting the output) then something needs to be constantly reading from that pipe. Usually you can accomplish this in a reader thread. You can read from the stdout pipe in a thread until the process ends and the pipe closes. > > This is something every company needs, so I thought that this would be > useful for people. > >From a glance at the readme, it looks like a very specific implementation of a render queue solution (Rush, Dr Queue, Qube, Smedge, ...). Is the difference here that the Maya process stays running instead of loading for each batch of tasks? I know Qube uses this approach for their custom support for Maya Batch tasks. When they schedule a task to a node they start a maya session and feed it work over the commandPort until the job has no more tasks. > If anyone wants access, let me know how to give people edit access on > github, I am a github newb. > > On Thu, Jan 19, 2017 at 1:22 PM, Justin Israel <[email protected]> > wrote: > > > > On Fri, Jan 20, 2017, 6:33 AM Tony Barbieri <[email protected]> wrote: > > Previously I've used the communicate method on a Popen object to get the > output and currently I am using QtCore.QProcess with the > readyReadStandardOutput, readyReadStandardError signals to get the output > to display in Qt widgets. I'm using QtCore.QProcess in a situation similar > to your's where I have workers executing mayapy processes. > > > > I've done probably one or both of those in the past as well, without an > issue in collecting stdout for display. > > @Christopher, we probably need to see a small example of what you are > doing, that isn't working as expected. > > > On Thu, Jan 19, 2017 at 5:34 AM, Marcus Ottosson <[email protected]> > wrote: > > Anyone have experience with getting feedback out of mayapy? > > Something like this? > > $ mayapy -c "import sys;sys.stdout.write('Hello world!')" > Hello world! > > > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBAp5CqQ-YTgw9nN97DmyWyyVBuY-D6HaPpJakssW8Fig%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBAp5CqQ-YTgw9nN97DmyWyyVBuY-D6HaPpJakssW8Fig%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > Tony > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAJhmvsSGvt2gMT-4sh4-RUo1Uo6iiJ02mUrAqQzjpD-f-zt5mQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAJhmvsSGvt2gMT-4sh4-RUo1Uo6iiJ02mUrAqQzjpD-f-zt5mQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2idOnzBMfb6mF6V_7mDQdDexD7jD_f%2BRa_pLk8qO9oDw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2idOnzBMfb6mF6V_7mDQdDexD7jD_f%2BRa_pLk8qO9oDw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > CE > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAEdZ1gyawRvEpVMzxzScJ6fXE%3DFZw9sfyFVkGG6BNrjppkEnjw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAEdZ1gyawRvEpVMzxzScJ6fXE%3DFZw9sfyFVkGG6BNrjppkEnjw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2_eX3SzcjVJpbYO6N%3D0MhkP4j-aSvggvWCzAhZcetamA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
