On Tue, May 20, 2008 at 9:29 AM, lorax <[EMAIL PROTECTED]> wrote:

>
> Re: break python scripts.
>
> This is my first foray into Python so other than Django, I'm not sure
> what I'd break. And I'm not sure what you mean by patch django-
> admin.py to point to where env is.
>
> Thanks for you help.
>

re: patching django-admin

You could change the first line of django-admin.py from:

#!/usr/bin/env python

to

#!/bin/env python

Or, as Marco says you could preface the script name with 'python' and avoid
the whole issue.  The first line is just trying to get the shell to find the
appropriate python command to run in order to execute the script, if you run
python directly the first line is ignored (since it's a python comment).

re: breaking python

I wasn't saying you would break anything, I was saying the hosting provider
has caused things to break by putting env in a non-standard place.  Lots of
python scripts use that first line, and apparently none of them will work on
your hosting provider's setup because they've placed env in a non-standard
location.

Karen


>
>
>
> On May 20, 9:27 am, lorax <[EMAIL PROTECTED]> wrote:
> > Seems it's in /bin/env
> >
> > On May 20, 9:22 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> >
> > > On Tue, May 20, 2008 at 9:17 AM, lorax <[EMAIL PROTECTED]> wrote:
> >
> > > > BUT!
> >
> > > > env --help DID work
> >
> > > Hmm.  So env is in some non-standard place?  What does "which env"
> show?
> >
> > > You could patch your django-admin.py to point to where your host has
> put
> > > env.  It's a bit odd for it not to be in /usr/bin, though -- this is
> going
> > > to break plenty of python scripts that assume /usr/bin/env will be
> there.
> >
> > > Karen
> >
> > > > On May 20, 9:01 am, "Gregg Banse" <[EMAIL PROTECTED]> wrote:
> > > > > Hi Karen,
> > > > > Thanks for the response.
> >
> > > > > The system didn't like that command. - No such file or directory.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to