[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QtCore.QProcess.start insists on having a QStringList as
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2010-12-24 22:59:13
Message-ID: 4be201129b4f6bb54b5345c20d117ae1 () localhost
[Download RAW message or body]

On Fri, 24 Dec 2010 22:10:48 +0100, solsTiCe d'Hiver
<solstice.dhiver@gmail.com> wrote:
> hi.
> I am using a QProcess with a list as second argument with the start
> function. It was never a problem before with python 2.6 and qt 4.6.1 and
> the corresponding pyqt.
> 
> I use python 2.7.1 on linux (compiled from source-archlinux build) and
> pyqt 4.8.2 and qt 4.7.1
> I use python 2.7.1 in Windows XP SP3, pyqt 4.8.2 from
> PyQt-Py2.7-x86-gpl-4.8.2-1.exe
> 
> Now that I retest my app, i see no problem on linux but on windows XP
> there is a problem
> 
> my code is:
> p = QtCore.QProcess(self)
> p.start(CMD, [a list of args])
> 
> in windows console:
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> X:\>c:\Python27\python.exe m.py
> Traceback (most recent call last):
>   File m.py", line 300, in updateLabel
>     self.pronounceit(t)
>   File "m.py", line 225, in pronounceit
>     p.start(ESPEAK_CMD, ['-v', ESPEAK_LANG, '-s',  '%d' %
> ESPEAK_SPEED,'-w', self.tmpwav, '--', s])
> TypeError: arguments did not match any overloaded call:
>   QProcess.start(QString, QStringList, QIODevice.OpenMode
> mode=QIODevice.ReadWri
> te): argument 2 has unexpected type 'list'
>   QProcess.start(QString, QIODevice.OpenMode mode=QIODevice.ReadWrite):
> argument
>  2 has unexpected type 'list'
> 
> if I try with QtCore.QStringList(QtCore.QString('...')) it does work
> (even on linux) and I don't know why because I got no error.
> 
> if I try with QtCore.QStringList([my list]), i got an error on windows:
> 
> TypeError: arguments did not match any overloaded call:
>   QStringList(): too many arguments
>   QStringList(QString): argument 1 has unexpected type 'list'
>   QStringList(QStringList): argument 1 has unexpected type 'list'
> 
> but this works on linux !!!
> 
> I don't know what to do to make it work in Windows. Everything fails. 
> 
> Please, please work out those discrepancies between Linux and Windows.

...as opposed to discrepancies in your installations.

The code is the same on all platforms and works fine for me - please
supply a complete example that demonstrates the problem.

Note that no distinction is made between an argument of the wrong type and
a container argument of the right type (like a list) but containing an
element of the wrong type (ie. something that can't converted to a
QString).

Phil
_______________________________________________
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