Hi,
In order to use a popen function, I need convert a QString in python
string to use as argument.

My code was:

        # self.command = "program " + self.MyLineEdit.text()
        # p_output = os.popen(self.command)

And I got:

        > TypeError: popen() argument 1 must be string, not QString


because self.command is QString I tried change the type with ascii() method:

        # self.command = "program " + self.MyLineEdit.text()
        # p_output = os.popen(self.command.ascii())

But I still got (another) error message:

        > p_output = os.popen(self.command.ascii())
        > AttributeError: ascii



best regards,

- tiago
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to