On 12/17/06, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Dec 16, 2006, at 6:37 PM, sheila miguez wrote:
>
> > I have ActivePython and a cygwin install of python. When I installed
> > the packages required by dabo they went into the ActivePython
> > distribution, but when running python scripts the /usr/bin/env calls
> > the cygwin install. which is annoying. I've been specifying the other
> > python directory by hand.
>
>         Right-click on a .py file, and select 'Choose Program...'. Select
> the ActivePython executable, and check the 'Always open...' box. That
> should associate .py with the ActivePython version.

Okay, but the #! /usr/bin/env python pulls up the cygwin version, not
the ActivePython version, and I've been starting things from the
command line, not double-clicking



> > What could I do to avoid this problem without uninstalling the cygwin
> > package? (doing that would screw with some dependencies)?
> >
> > Speaking of cygwin, should I be on the lookout for any weirdness
> > caused by the alternate way of specifying path names or is that
> > handled gracefully by python? (e.g. c:\home vs /cygdrive/c/home)
>
>         Definitely! The dumb choice of backslash for Windows wreaks havoc
> with pathing, since backslash is a meta character, and thus has to be
> constantly escaped. When I first started working in Python on
> Windows, I would save a path as 'c:\home', which would then come back
> as 'c:\\home'. Next time I saved it Python would escape both of these
> backslashes, changing it to 'c:\\\\home', etc.

In tcl land one is supposed to use [file join] and [file split] in
order to create and use os-agnostic paths, so there is probably
something similar in python. I bet.


-- 
sheila

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to