Jul-08-2017, 01:44 PM
I opened GNOME terminal, ran the following commands
>>> python
>>> import os
>>> dir(os)
It listed me many functioned present in this module, but they were all horizontally aligned and so were difficult to parse through at one look, so , I wanted to grep a particular function supported here named "system", so I did
>>> dir(os) | grep system
It gave me an error when I did this. Also I am not able to run shell commands in interpreter like I could have had used the "sed" tool to organize all functions presented to me by dir(os) aligned vertically one by one instead of horizontally all toghether.
How can I grep to find out if that particular function exists and also how can I show all the functions one by one, each function presented on a single line?
>>> python
>>> import os
>>> dir(os)
It listed me many functioned present in this module, but they were all horizontally aligned and so were difficult to parse through at one look, so , I wanted to grep a particular function supported here named "system", so I did
>>> dir(os) | grep system
It gave me an error when I did this. Also I am not able to run shell commands in interpreter like I could have had used the "sed" tool to organize all functions presented to me by dir(os) aligned vertically one by one instead of horizontally all toghether.
How can I grep to find out if that particular function exists and also how can I show all the functions one by one, each function presented on a single line?