This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: python and cygwin

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

> 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.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]