[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: David James <james_at_cs.toronto.edu>
Date: Tue, 1 Jul 2008 12:50:43 -0700

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)

Cheers,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-01 21:51:02 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.