Re: os.popen output different from native shell output

2009-08-26 Thread Nobody
On Tue, 25 Aug 2009 11:42:31 -0700, nickname wrote: > The reason why I want to do this is because I am going to do a little > project. I will write a python script called ls which will log the > time and username and then will show the actual ls output. I want this > to be transparent and so want

Re: os.popen output different from native shell output

2009-08-25 Thread nickname
On Aug 25, 11:57 am, Thomas Guettler wrote: > In one of the first chapters of "Advanced programming in the unix > environment (second edition)" there is explained how a unix shell works. > > You could write you own shell using python. This way the python > interpreter gets stared only once, and no

Re: os.popen output different from native shell output

2009-08-25 Thread Thomas Guettler
In one of the first chapters of "Advanced programming in the unix environment (second edition)" there is explained how a unix shell works. You could write you own shell using python. This way the python interpreter gets stared only once, and not for every call to "ls". Have fun, Thomas nickn

Re: os.popen output different from native shell output

2009-08-25 Thread nickname
On Aug 25, 6:16 am, Nobody wrote: > On Tue, 25 Aug 2009 01:36:08 -0700, nickname wrote: > >        I am a relative newbie to python, I am using os.popen to run an > > ls command. The output that I get using the read() function is > > different in look and feel from when I run the ls command native

Re: os.popen output different from native shell output

2009-08-25 Thread Nobody
On Tue, 25 Aug 2009 01:36:08 -0700, nickname wrote: >I am a relative newbie to python, I am using os.popen to run an > ls command. The output that I get using the read() function is > different in look and feel from when I run the ls command natively > from the shell (not via python). As

Re: os.popen output different from native shell output

2009-08-25 Thread Thomas Guettler
hi, you get the popen output like this: u...@unixhost> ls | cat nickname schrieb: > Hi all, >I am a relative newbie to python, I am using os.popen to run an > ls command. The output that I get using the read() function is > different in look and feel from when I run the ls command nativ

Re: os.popen output different from native shell output

2009-08-25 Thread Chris Rebert
On Tue, Aug 25, 2009 at 1:36 AM, nickname wrote: > Hi all, >       I am a relative newbie to python, I am using os.popen to run an > ls command. The output that I get using the read() function is > different in look and feel from when I run the ls command natively > from the shell (not via python).

os.popen output different from native shell output

2009-08-25 Thread nickname
Hi all, I am a relative newbie to python, I am using os.popen to run an ls command. The output that I get using the read() function is different in look and feel from when I run the ls command natively from the shell (not via python). I display the ouput via python by using the print functio