Just as I was using the system() function in the Gtk+ to invoke the system, here too I needed a function for invoking the system calls.
I obviously, had to look into atleast 20 to 30 documents to understand clearly the system call functions and decide on which will suit my work.
I learnt that the os.popen() function has been deprecated after the python2.4 .
Note: to use the above function we need to import the os module.
Note: the above command will give the list of files in the current directory, BUT we can not have it as ls -l !!! in order to do so, keep the command in a variable and then call it in the popen() function.
Another way is to import the subprocess module.The subprocess is widely used now since it came only after the python2.4 version.
A sample code: