Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107702

Re: Python path and append

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Python path and append
Date Wed, 27 Apr 2016 13:06:44 +1000
Lines 32
Message-ID <mailman.137.1461726413.32212.python-list@python.org> (permalink)
References <smbdhb5kjje2oandna4vj5udku9gh1h9oa@4ax.com> <27nshbp40p1llr231dqm31p754tvurkb8i@4ax.com> <nfm22a$qms$1@reader1.panix.com> <pq4thb907ep4mknnali2rhqgao32jdsn5o@4ax.com> <571eca35$0$1607$c3e8da3$5496439d@news.astraweb.com> <pba0iblrf5v5kojjfbqsrpoobt50k2ggvq@4ax.com> <CAPTjJmrTQu05a5uubz2qKu1fs_Xr9xtUuaG_Zi4GD0cZ29j5hA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de k+QmxPzgHfUZoykZRvVDKAPhwukulUqf+k1/Q0IFdz7g==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'messages.': 0.04; 'subject:Python': 0.05; 'fixes': 0.05; 'that?': 0.05; 'cc:addr:python-list': 0.09; 'assumed': 0.09; 'assume': 0.11; 'output': 0.13; 'suggest': 0.15; 'wed,': 0.15; 'importing': 0.15; '"getting': 0.16; '2016': 0.16; '>>on': 0.16; 'assumptions': 0.16; 'btw': 0.16; 'error"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'theme.': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'fix': 0.21; 'ok.': 0.22; 'text,': 0.22; 'file.': 0.22; 'trying': 0.22; 'am,': 0.23; 'tried': 0.24; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'error': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'tend': 0.27; 'actual': 0.28; 'it."': 0.29; 'that.': 0.30; 'code': 0.30; 'error.': 0.31; 'non': 0.32; 'getting': 0.33; 'problem': 0.33; 'common': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'tue,': 0.34; 'file': 0.34; 'that,': 0.34; 'received:google.com': 0.35; 'easiest': 0.35; 'exist': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'say': 0.37; "won't": 0.38; 'received:209': 0.38; "didn't": 0.39; 'easily': 0.39; 'your': 0.60; 'avoid': 0.61; 'more': 0.63; 'future.': 0.67; 'analysis': 0.72; '+1000,': 0.84; 'chrisa': 0.84; 'dumb': 0.84; 'seymore4head': 0.84; 'yours': 0.89; 'to:none': 0.91; 'adopting': 0.91; 'drops': 0.91; 'acknowledge': 0.93
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:cc; bh=ld/EYQTQRMG6mtpqpxpdakeKdLHtOc//MYuniPS/XxA=; b=OHFtdhiKNdf4hIUPcoa2xjyECxwAA2dq7Nuy25xaIfsZJjF1iv6mNjhfix34PlxEk+ ryKVlGaMU2lLMQqiKCU3vym+MaopFPNaKa8gTC7vRWhFN72dmvVu/WRMiRCQ+miHPAgW 8UE6o819jglaagHhVdGIFlKXb0MT6Ub0ThooonEH3ag0ZyEpsQvH23tpMf8ynfHLAsRO PdMkqDhJNb3EbE6Humntk1JShkovbTsiHqxSnCxHSlNFjxJoJNKDOFwYFahXF3uqrbHP ZkOZicay6sqDHmvHmgfBUr+C+3JzCb8lf0Ad/BItrwNReIIfE+SlyE6x/h+bqtvcbzCd +7fA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=ld/EYQTQRMG6mtpqpxpdakeKdLHtOc//MYuniPS/XxA=; b=ivFM+8+PZU6X1YMRXSTsnbgkitAiV4bDhpijFGzUNjsd3RM1pgyi9NVBcWwkQx3N00 4HM6jv2cKKaw5VWrrIIeH3KfwXjNYoTz6ncLqsebQFuJRudX5Ibyhv5XyKJyb6Mfh1wK ut+CmpOoJuY2qu11WR8yZLYGwEKG2JU0PJ8gZoYF4xdf5J3PWZNAKKjVb9T4qfLyjrFN Hcxe0i0x2eLPQLnKkrw/6SQWM3J/Dyc+0h4SesKoUjh5oyit6FppJUtkwE7ABTTE834C YhyQ523w5XDZ1Vp9yrfc+3qYHlXFCsMXtHy9qcVWXHPvLCf5rRMFl5HlfuobJ8LUbiH+ dZ4g==
X-Gm-Message-State AOPr4FVjJEJsdMC4ANlEnVDdy2yw/3PgtK5dlMj5adzOmDSw9FPRZea5N39ln9JogP8X33LXvFRWmyhFb0N4TQ==
X-Received by 10.107.169.13 with SMTP id s13mr7060952ioe.19.1461726404520; Tue, 26 Apr 2016 20:06:44 -0700 (PDT)
In-Reply-To <pba0iblrf5v5kojjfbqsrpoobt50k2ggvq@4ax.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAPTjJmrTQu05a5uubz2qKu1fs_Xr9xtUuaG_Zi4GD0cZ29j5hA@mail.gmail.com>
X-Mailman-Original-References <smbdhb5kjje2oandna4vj5udku9gh1h9oa@4ax.com> <27nshbp40p1llr231dqm31p754tvurkb8i@4ax.com> <nfm22a$qms$1@reader1.panix.com> <pq4thb907ep4mknnali2rhqgao32jdsn5o@4ax.com> <571eca35$0$1607$c3e8da3$5496439d@news.astraweb.com> <pba0iblrf5v5kojjfbqsrpoobt50k2ggvq@4ax.com>
Xref csiph.com comp.lang.python:107702

Show key headers only | View raw


On Wed, Apr 27, 2016 at 12:56 PM, Seymore4Head
<Seymore4Head@hotmail.invalid> wrote:
> On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano
> <steve@pearwood.info> wrote:
>
>>On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote:
>>
>>> BTW I was trying to use a line like yours that used an output file
>>> that didn't exist and was getting an error.  I assume that import os
>>> fixes that.
>>
>>
>>Why would you assume that?
>>
>>
>>"Doctor, I have a problem with my arm, but I won't tell you what. I assume
>>that if I take cough drops that will fix it."
>
> OK.  Dumb question acknowledged.
>
> I got an error when I tried to write to a non existent file.  I
> "incorrectly" assumed wrong.  That is going to be a common theme.

If you can acknowledge that, I suggest adopting a stance that will
tend to avoid such assumptions in the future. The easiest way is to do
less of your own analysis and more copy/paste of exact error messages.
Don't say "getting an error" - quote the actual code and error. Don't
say "I assume that", ask the question ("Would importing the os module
fix that?"). We'll be able to help more easily with actual error text,
and you won't look dumb :)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-19 18:29 -0400
  Re: Python path and append Chris Angelico <rosuav@gmail.com> - 2016-04-20 08:38 +1000
  Re: Python path and append Matthew Barnett <mrabarnett@mrabarnett.plus.com> - 2016-04-20 00:36 +0100
  Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-25 14:10 -0400
    Re: Python path and append Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-04-25 18:24 +0000
      Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-25 15:00 -0400
        RE: Python path and append Joaquin Alzola <Joaquin.Alzola@lebara.com> - 2016-04-25 19:08 +0000
          Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-25 16:15 -0400
            Re: Python path and append Random832 <random832@fastmail.com> - 2016-04-25 16:28 -0400
            Re: Python path and append Peter Otten <__peter__@web.de> - 2016-04-25 23:38 +0200
            Re: Python path and append Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-25 19:57 -0400
        Re: Python path and append Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-04-25 19:31 +0000
        Re: Python path and append MRAB <python@mrabarnett.plus.com> - 2016-04-25 20:44 +0100
          Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-25 16:43 -0400
        Re: Python path and append Steven D'Aprano <steve@pearwood.info> - 2016-04-26 11:51 +1000
          Re: Python path and append Dan Sommers <dan@tombstonezero.net> - 2016-04-26 01:59 +0000
          Re: Python path and append Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-26 18:23 +1200
          Re: Python path and append boB Stepp <robertvstepp@gmail.com> - 2016-04-29 15:26 -0500
            Re: Python path and append Steven D'Aprano <steve@pearwood.info> - 2016-04-30 11:44 +1000
    Re: Python path and append John Gordon <gordon@panix.com> - 2016-04-25 21:26 +0000
      Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-25 18:04 -0400
        Re: Python path and append Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-25 20:03 -0400
        Re: Python path and append Steven D'Aprano <steve@pearwood.info> - 2016-04-26 11:53 +1000
          Re: Python path and append Seymore4Head <Seymore4Head@Hotmail.invalid> - 2016-04-26 22:56 -0400
            Re: Python path and append Chris Angelico <rosuav@gmail.com> - 2016-04-27 13:06 +1000
            Re: Python path and append Stephen Hansen <me+python@ixokai.io> - 2016-04-27 17:24 -0700
      Re: Python path and append Chris Angelico <rosuav@gmail.com> - 2016-04-26 10:25 +1000

csiph-web