[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Conversion between QString and string
From: Tiago Maluta <maluta_tiago () yahoo ! com ! br>
Date: 2007-12-23 21:24:07
Message-ID: 476ED1F7.9070401 () yahoo ! com ! br
[Download RAW message or body]
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 PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic