Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!204.52.135.9.MISMATCH!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.053 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; 'posting.': 0.09; 'to:name:python-list': 0.15; 'shells': 0.16; 'wrote:': 0.17; 'alex': 0.17; 'shell': 0.18; 'linux': 0.24; 'command': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'done.': 0.27; 'parent': 0.29; 'subject:like': 0.29; "i'm": 0.29; 'implement': 0.32; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'list': 0.35; 'doing': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'subject:" ': 0.36; 'rather': 0.37; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'bottom': 0.60; 'policy': 0.62; 'reply': 0.66; 'phone': 0.68; 'mail.': 0.69; 'subjectcharset:utf-8': 0.72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:in-reply-to:mime-version:content-type :content-transfer-encoding:subject:from:date:to:message-id; bh=y/M0zOIxB4UsEdKzB38eScOxWeTB0iLS4p/LyZABHqQ=; b=A4rxugNRoG+qHrSWRHCm4wfnwFmoK7Q4JfpLKtl01gfcCHFLuC/vUJsh5gKFyywocF JvQxa++tdLl9bOAgQZxfLtnh5w6MbNsRFgVmxvpMz8t9YhL2NQYR79I3UEm08g1yzTac 73gTD9RnsRpq4u5Icdk6v4NCug7Uq0B2UY3lK91acXyaoVpGpl+JjVpHq4dSTm0CpqmG X31Y/BBJF0npS/TQxP+Xks/51ENyFCfjf1tvGSTy0l3ZvPbFDI1vbiVwdsTUARflslrI UG0DK0HcCjmVLEmxx9tkpj6aPJnNaWFbcUgWMxUbDU4oF/Z0ScbTCpxZqy6PWSO669YK t+tg== References: User-Agent: K-9 Mail for Android In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: =?UTF-8?Q?Re=3A_=E5=9B=9E=E5=A4=8D=EF=BC=9A_how_can_I_implement?= =?UTF-8?Q?_=22cd=22_like_shell_in_Python=3F?= From: Kushal Kumaran Date: Thu, 28 Jun 2012 19:16:23 +0530 To: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1340891193 news.xs4all.nl 6841 [2001:888:2000:d::a6]:42200 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24612 Alex chen wrote: >I just want to write a python program,it can be called in the linux >terminal like the command "cd" to change the directory of the shell >terminal > This cannot be done. Shells implement cd as a builtin, rather than a command such as /usr/bin/cd because there is no way to change the current working directory of your parent process. Also, policy on this mailing list is to put your reply below the text you are quoting, as I'm doing here. It's called bottom posting. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.