Reply
Thread Tools
Posts: 1 | Thanked: 0 times | Joined on Nov 2009
#1
Hi all,

Recently for one of my apps i was using os.system() call. to execute a few shell toolkits...

But found out that everything apart from that (all the print statements) are working .. but only those with os.system fail..

I have "import os"
weird thing is that it works on scratchbox but now when put onto the phone.

Can any one please help me.. its a bit urgent as well..

if anyone can comfirm that something like this..
os.system("ls > process_output.log")
would work , it would be of really great help..

Also if there are any alternatives to using os.system. I would like to know..

Thanks...
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#2
if anyone can comfirm that something like this..
os.system("ls > process_output.log")
would work , it would be of really great help..
Works for me ...

But be carefull that on device you use busybox, not all option on all commands.
 

The Following User Says Thank You to Khertan For This Useful Post:
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#3
Originally Posted by wrapster View Post
Also if there are any alternatives to using os.system. I would like to know.
Yes, "import subprocess" is recommended by the Python docs.

-jkq
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:43.