Simple question for all of you python gurus

Cameron Laird claird at lairds.com
Fri Feb 27 00:14:33 CET 2004


In article <NYu%b.12366$qL1.145 at fed1read02>,
Sean Berry <sean_berry at cox.net> wrote:
			.
			.
			.
>so I tried to do something like this
>os.system("cd /home/%s/.tmda/pending" %userid)
>li = os.popen("/usr/bin/grep -i %s" %phase)
>lis = lis.readlines()
>
>But since cd is a shell command, it does not seem to work either.
>
>How can I do this?
			.
			.
			.
  import os

  os.chdir("/home/%s/.tmda/pending" % userid)
  li = os.popen(...
-- 

Cameron Laird <claird at phaseit.net>
Business:  http://www.Phaseit.net



More information about the Python-list mailing list