[Tutor] Using Linux commands

desiderata at softhome.net desiderata at softhome.net
Wed Dec 10 18:30:57 EST 2003


Thanks for the reply,

Hmm.. from that link you gave me I found something useful os.system()
, Sorry I couldn't get the open2/popopen/execlp to work right. 

>>> os.system('slapadd -l ldif-file.txt')

It works! Thanks a lot!



Regards,
Elijah



On 07:51 Wed 10 Dec?, David Dorgan wrote:
> Sure, check out os.popen, or os.open2[0], which means you can use input and
> output with commands, rather than just execute the command
> blindly and let it go to the terminal.
> 
> David.
> 
> [0]: http://www.python.org/doc/2.3.2/lib/os-process.html




More information about the Tutor mailing list