Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1340993032; bh=BM+F2734khLa3z1n7j2NrLxCFtDjlSSBTxUjXJErOiI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=bnvtB2orRG46XnNR4PMbVo7ByVviPs9t6PDYo/jvlkqWx4FKduQMKp15DpL4s8r5x AvBX/CgS1vlnZ2f1eJc6XfE8860muHlWTHKgjFVaqIUkT0f7/gRSISnOtcCKUtcXAx BhG3N8YBAWilDM2t91CqBBVbfL+YwE8pTJZpnzDE= X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'subject:Python': 0.05; 'python': 0.09; 'from:name:chris withers': 0.09; 'implemented.': 0.09; 'received:89.151': 0.09; 'received:89.151.125': 0.09; 'received:89.151.125.140': 0.09; 'received:server1.simplistix.co.uk': 0.09; 'received:simplistix.co.uk': 0.09; 'cc:addr:python-list': 0.10; '"python': 0.16; 'message-id:@python.org': 0.16; 'received:93.89': 0.16; 'received:93.89.128': 0.16; 'received:93.89.128.162': 0.16; 'received:buzzkill.local': 0.16; 'simplistix': 0.16; 'url:simplistix': 0.16; 'from:addr:python.org': 0.17; 'wrote:': 0.17; 'shell': 0.18; 'skip:" 30': 0.20; 'from:addr:chris': 0.22; 'cheers,': 0.23; 'cc:2**0': 0.23; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'skip:" 20': 0.26; 'executing': 0.27; 'chris': 0.28; 'subject:like': 0.29; 'file': 0.32; 'thanks': 0.34; 'path': 0.35; 'subject:?': 0.35; 'subject:" ': 0.36; 'method': 0.36; 'url:co': 0.66; 'sounds': 0.71; 'received:93': 0.72; 'subjectcharset:utf-8': 0.72; 'subject::': 0.83; 'received:89': 0.86 Date: Fri, 29 Jun 2012 18:48:43 +0100 From: Chris Withers User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: =?UTF-8?B?5qKm5bm76I2J?= Subject: Re: =?UTF-8?B?6L2s5Y+R77yaUmU6aG93IGNhbiBJIGltcGxlbWVudCAiY2QiIGw=?= =?UTF-8?B?aWtlIHNoZWxsIGluIFB5dGhvbj8=?= References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1340993034 news.xs4all.nl 6880 [2001:888:2000:d::a6]:49241 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24672 On 28/06/2012 12:39, 梦幻草 wrote: > > thanks !But this method can not change the directory of the main > process.For example: > the current directory is "/home/work/local/scripts",this directory have > a python script file "cd.py" > after executing the script cd.py by "python cd.py ..",the current work > directory has no changes,the path is still "/home/work/local/scripts" Sounds like you might want to give the ipython shell a go, since it has a lot of this already implemented. cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk