os.system prob

Aaron Barclay aaronb at jhcs.co.uk
Mon Aug 9 21:32:36 CEST 2004



Hello,

I am trying to send some commands via os.system but am getting tripped 
up by it stripping out the quote marks. I have:

program = "dcop klipper klipper setClipboardContents "
fileOut = '"test = FileOut(0, 
"/bobbleheads/shots/bh112_01/roto_neck/ramin/renders/test", "Auto");"'

The fileOut string must be enclosed with "'s and also contains several "'s.

So I put them togeter

command = program + fileOut
os.system(command)

My clipboard then contains

test = FileOut(0, 
/bobbleheads/shots/bh112_01/roto_neck/ramin/renders/test, Auto);

all of the " have been stripped out.

I need it to contain

"test = FileOut(0, 
"/bobbleheads/shots/bh112_01/roto_neck/ramin/renders/test", "Auto");"

any ideas?? 

ps - this may only work under KDE. If there are python specific commands 
to put things in the clip board
I can't find them??


Thanks in advance.




More information about the Python-list mailing list