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

List:       pykde
Subject:    [PyKDE] QString strangeness
From:       shane richards <shanerich () email ! com>
Date:       2003-09-15 23:29:14
[Download RAW message or body]

Just wondering how you keep an "=" sign in QString/QStringList, when passing
the list or string around?

I am trying to launch a command line program as a process, with
arguments sent in the form:

command -okey=arg1 -okey=arg2

(with no spaces inside the key/value pairs).

the following shows the idea - get a key/value and place 
the "-o" switch and the "=" sign to form an argument:

...
keyval = QString(" -o%1=%2").arg(key).arg(val)
print ("%s" % (keyval)) # returns what I want
args.append(keyval)
...
proc = QProcess(self)
proc.setArguments(args)
...

But if I use 'ps ax' to view the running processes on my system, "=" sign will 
have disappeared on the command line! It shall remain if I wrap it in spaces 
ie.

keyval = QString(" -o%1 = %2").arg(key).arg(val)

But for some reason this plays havoc with the running process and eats all my 
CPU!!!

I have noticed the same problem running programs from the 'tools' menu in  
eric-3.x. Any "=" sign just disappears. Anyone have a solution?


shanerich

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic