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

List:       pykde
Subject:    Re: [PyQt] QProcess: Seems to execute nothing
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2011-01-30 18:02:41
Message-ID: 43969a327c21d2f8d6c62a3db96bf1d1 () localhost
[Download RAW message or body]

On Sun, 30 Jan 2011 18:55:49 +0100, Manuel Rotter
<rotter.manuel@gmail.com>
wrote:
> Hello all
> 
> I'm trying to use QProcess to execute some commands, but it seems to do
> nothing.
> 
> Here is my Code:
> 
> http://python.pastebin.com/NKHaj1W4
> ---------------------------------
> p = QtCore.QProcess()
> #p.setStandardOutputFile(temp.name)
> p.start("sh -c 'echo lol > /home/naeg/lolfile'")
> 
> p.close()
> ---------------------------------
> 
> This file where I redirect to, doesn't even exist after executing that
> code.
> 
> It doesn't work with setStandardOutputFile() either, and also not
> without "sh -c".
> 
> 
> I'm using Python 3.1.3 and pyQt 4.8.1(for Python 3, of course).

Read the docs for start() more carefully. The program name is "sh", not
the whole command line.

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