Python path and append

Stephen Hansen me+python at ixokai.io
Wed Apr 27 20:24:34 EDT 2016


On Tue, Apr 26, 2016, at 07:56 PM, Seymore4Head wrote:
> On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano
> <steve at 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.

Oh, he wasn't saying it was a dumb question. He was complaining you said
you were "getting an error". That's not a dumb question, that's a
useless report of a problem. If you don't say what exactly the error is,
we can't help you.

If you want help, the two best things to do are:
  1) Show actual code. 
  2) Show actual, complete tracebacks. 

Having a nice description of what you expect to happen is often nice
too, especially if its doing something "wrong" and not giving an obvious
traceback. Seeing specifically what the wrong behavior is, and you
explaining why you think its wrong, can be invaluable. 

-- 
Stephen Hansen
  m e @ i x o k a i . i o



More information about the Python-list mailing list