Sebastien Lelong wrote:
> Hi,
> 
> As an alternative, you can specify explicitely "python jallib.py ..." (I
> suppose you run it with "./jallib.py" or something like this). "svn diff
> -r1350:HEAD jallib.py" shows nothing about shebang line "#!/usr/bin/python",
> but if you "svn blame -r1350 jallib.py", you'll know who to blame :))))
> 
> My guess is "\r\n" can't be recognize by your shell (triedbash and zsh). I
> can't find a fix except overwrite it replacing "\r\n" with "\n"... But this
> can occur again. My suggestion is to use jallib wrapper. See "jallib" file
> (no .py extension), and fill env. vars, specially JALLIB_PYTHON. Put it in
> dir knows by PATH, and run it with "jallib reindent ...". I always use this.
> Mine looks like this:
> 
> #!/bin/bash
> #
> ...
> #########################
> # ENVIRONMENT VARIABLES #
> #########################
> # Path to the jallib root's repository (containing "tools,
> export JALLIB_ROOT=$HOME/Documents/Projects/jallib
> # path to jallib root's libraries.
> export JALLIB_REPOS=$JALLIB_ROOT/include
> # path to jallib root's samples.
> export JALLIB_SAMPLEDIR=$JALLIB_ROOT/sample
> # path to "jalv2" executable. If not in your PATH, set an absolute path to
> the exec
> export JALLIB_JALV2="/home/sirloon/bin/jalv24l -long-start"
> ...
> ...
> ####################
> # python script    #
> ####################
> # (advanced users)
> # uncomment the two last line, and comment the standalone call.
> ## path to "python" executable, if needed
> export JALLIB_PYTHON=python
> $JALLIB_PYTHON $JALLIB_ROOT/tools/jallib.py $*
> 
> 
> 
> You can be very explicit with python interpreter version (and that's why I
> don't like the shebang way)
> 
> export JALLIB_PYTHON=python2.5
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thats the key Seb.  I am running testing (squeeze) and python 2.5.  I 
was also getting the same error as William.  I then tried it with 2.4
and 2.3  and they all work.  It's been quite a while since I used python 
in a script and never thought about your fix.

Many Thanks

Wayne


-- Give a man a fish - feed him for a day
Teach a man to fish - feed him for life

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

Reply via email to