Hi all,

I'm trying to use QProcess in Maya, and I must have some fundamental 
misunderstanding because I can't make it work.

Here's the simplest thing I've tried (in the Script editor, Maya 2013)

from PyQt4 import QtCore
class processTest(QtCore.QObject):
    def __init__(self):
        super(processTest, self).__init__()
        process = QtCore.QProcess(parent=self)
        process.setProcessChannelMode(process.ForwardedChannels)
        process.start('python', ['-c', 'print("finished qprocess")'])
myTest = processTest()

My expectation was that that would print "finished qprocess" to the script 
editor, but it doesn't do anything.

I've tried a bunch of other things, including writing to files and using 
signals, and with some combinations I get an error in Eclipse, "'Match job' 
has encountered a problem," but I haven't managed to get anything desirable.

As an aside, I'm trying to use the Perforce command line client and give 
the user a working Cancel button in case there's a delay due to network or 
server problems. Is QProcess the right choice for that?

Thanks,

Boon.

-- 
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/94e71427-c5d8-4c18-8c85-d17cb99a74a2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to