[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31953 - branches/ctypes-python-bindings

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Tue, 1 Jul 2008 22:05:12 +0200

2008-07-01 21:50:43 David James napisaƂ(a):
> On Tue, Jul 1, 2008 at 12:24 PM, Peter Samuelson <peter_at_p12n.org> wrote:
> >
> >>> + for path in os.environ["PATH"].split(":"):
> >>> + if os.path.exists(path + "/" + ctypesgen_basename):
> >>> + ctypesgen = path + "/" + ctypesgen_basename
> >
> > [Blair Zajac]
> >> Wouldn't it be safer to use os.path.join() instead of string
> >> concatenation? This is for non-Unix platforms.
> >
> > For that matter, Windows splits PATH on ";", not ":".
>
> That's right. We should split os.environ["PATH"] on os.pathsep, which
> evaluates to the right thing on all platforms (";" on Windows, ":" on
> Linux)

Fixed in r31958.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-07-01 22:07:16 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.