open() error ---- what am I missing?
John Machin
sjmachin at lexicon.net
Mon Mar 18 15:50:58 EST 2002
jimd at vega.starshine.org (Jim Dennis) wrote in message news:<a7462b$11ve$1 at news.idiom.com>...
> In article <avPg8.11102$hK4.4053571 at e420r-atl1.usenetserver.com>,
> Eric Torstenson wrote:
>
> > OK I figured it out. It was a misleading error message. For those with
> > similar troubles I have listed an explanation
>
> > It was a bad path name after all. It is a nested structure, where at one
> > point I left off one extra "\" (I'm using windows). I had looked at that
> > path a dozen times, somehow missing that single "\" down toward the
> > middle....
>
> In other words it was another case of: r"use raw strings for
> filename literals under Win Python!"
Possibly another case of: """
In general, if you absolutely *must* hard-code filename literals in
Python scripts, don't use "\\name" (for example) or even r"\name", use
"/name"; the Windows API happily supports it.
"""
More information about the Python-list
mailing list