Path: csiph.com!aioe.org!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.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 X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'assign': 0.07; 'utf-8': 0.07; 'alias': 0.09; 'collier': 0.09; 'subject:module': 0.09; 'cc:addr:python-list': 0.11; "'/'": 0.16; 'callable': 0.16; 'os.getcwd()': 0.16; 'syntaxerror:': 0.16; 'typeerror:': 0.16; 'sat,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; "skip:' 10": 0.31; '"",': 0.31; '>>>>': 0.31; 'file': 0.32; 'url:python': 0.33; 'running': 0.33; '(most': 0.33; 'sense': 0.34; 'could': 0.34; "can't": 0.35; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'work?': 0.38; 'pm,': 0.38; 'recent': 0.39; 'url:mail': 0.40; 'how': 0.40; 'from:charset:utf-8': 0.61; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; '8bit%:43': 0.74; 'jul': 0.74; 'url:tk': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vRwggUQtQ/dqHEVG6wCOPLWyzpkvqIwjEWzKQKu9MBo=; b=nFi1oOpqyW2KrHkVFQIR81uKnY7cKnO5nY6FSKCaOLQeWKtq9IjoALLOInTxe2jgN7 MZDCsTJqbmaGf+YcG4amS7fFTeHM5M7qI7lMQrzAgkASsurkrN9i3xGTxFI52hCHwxt6 irMmgapaBorrzMScb8VI0WR4pF8xHqNcxQ9nX/4Ij4nN2C8Y4ZzPnZ0QX4RVF/agr+T1 f6zVMcChPuKTMVRUAn8xvhuDxHjCvd4LHQ+YcOHWsumP+PaxMtAwEayZvAPW3I+pzV6B q6ZWZS2kLwsWOb+3mDoIqiP0kv7bpY/aT4El7KRw0RF19wGqpQk2ldY9iXLtJM1lXGtN cIGw== MIME-Version: 1.0 X-Received: by 10.42.224.72 with SMTP id in8mr21073844icb.114.1374932204199; Sat, 27 Jul 2013 06:36:44 -0700 (PDT) In-Reply-To: <51F3C8FA.9040801@Gmail.com> References: <51f334eb$0$29971$c3e8da3$5496439d@news.astraweb.com> <51F3C8FA.9040801@Gmail.com> Date: Sat, 27 Jul 2013 15:36:44 +0200 Subject: Re: Critic my module From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= To: Devyn Collier Johnson Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Python Mailing List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374932207 news.xs4all.nl 15982 [2001:888:2000:d::a6]:38523 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51356 On Sat, Jul 27, 2013 at 3:19 PM, Devyn Collier Johnson wrote: > About the aliases, I have tried setting pwd() as an alias for "os.getcwd(= )", > but I cannot type "pwd()" and get the desired output. Instead, I must typ= e > "pwd". I tested this in Guake running Python3.3. > >>>> os.getcwd() > '/home/collier' >>>> pwd =3D os.getcwd() >>>> pwd() > Traceback (most recent call last): > File "", line 1, in > TypeError: 'str' object is not callable >>>> pwd > '/home/collier' >>>> pwd() =3D os.getcwd() > File "", line 1 > SyntaxError: can't assign to function call > > > How could I make pwd() work? > > > Mahalo, > > DCJ > -- > http://mail.python.org/mailman/listinfo/python-list >>> import os >>> pwd =3D os.getcwd >>> pwd() '/home/kwpolska' >>> os.chdir('/') >>> pwd() '/' >>> --=20 Chris =E2=80=9CKwpolska=E2=80=9D Warrick PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense