Hi,
I am a novice in python. I was trying to write a simple script on
Linux (python 3.0) that does the following
#cd directory
#ls -l
I use the following code, but it doesn't work:
import os
directory = '/etc'
pr = os.popen('cd %s' % directory,'w')
pr.close()
pr = os.popen('ls -l','w')
On Oct 28, 3:02 pm, Jon Clements wrote:
> On 28 Oct, 13:39, banu wrote:
>
>
>
> > Hi,
> > I am a novice in python. I was trying to write a simple script on
> > Linux (python 3.0) that does the following
>
> > #cd directory
> > #ls -l
>
&
On Oct 28, 3:18 pm, Benjamin Kaplan wrote:
> On Wed, Oct 28, 2009 at 9:39 AM, banu wrote:
> > Hi,
> > I am a novice in python. I was trying to write a simple script on
> > Linux (python 3.0) that does the following
>
> > #cd directory
> > #ls -l
>
>