Subject: Re: python and cygwin
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Fri, 20 Feb 2004 15:54:52 -0800

Totte Karlsson wrote:

> However, it seems as if I can execute the win32 python interpreter from
> within the cygwin bash shell, and it seems to work as long the cygwin path
> come into play, which is "unfortunate".

The win32 one has no idea what a posix (e.g. /cygdrive or /usr/bin) path
is, and how could it?  So naturally it complains if you try to
force-feed it one.  Luckily under win32 the forward slash is treated
equally as a path separator as backslash so if you stick to relative
paths you can usually fake it.

The order that they are listed in your $PATH determines which one is
executed.  What I do, and what I assume most other Cygwin users do, is
prepend the cygwin paths to $PATH in the shell startup, but leave the
$PATH free of all cygwin stuff for the rest of windows.  That means when
you're at a bash prompt you get the Cygwin version of Python, and when
you're at a regular Windows command prompt you get the win32 version of
Python.

> I thought the idea with cygwin was to provide unix tools working under
> windows, not to make windows into unix/posix? Now it looks as if I need to
> have two sets of python running, one for cygwin and one for windows, and
> both are running in windows! It is something fishy with that I think..?

AFAIK, the goal of Cygwin is to provide a posix environment.  If you
want to use native win32 versions of things then do it outside of
Cygwin.  There are times when you'd want to use either/both.  For
example python scripts that require curses will work under Cygwin but
not win32, whereas those that need wxPython will work with win32 but not
Cygwin.  Generic python scripts should work equally well in either, path
considerations noted.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/