Is there an @ command to set the language syntax version? If not,
should there be? I can see arguments for and against.
A natural extension would be to want to use the same mechanism to pick
which interpreter (and environment and...) is fired when [ctrl-B] is
pressed. I can see how this could be tricky work to implement cleanly,
also very cool though. I'd love to be able to execute and test batch
scripts with the same ease as I can currently with python from inside
Leo.
--
-matt
> Is there a python command to set the version?
> I don't know of one. I had problems where my scripts (non-leo) were
> expecting a different python version than what I had, and I didn't
> find a good solution. I think python expects only one installed
> version on the system.
Typically, you specify the full path to python executable when
launching scripts, if you want to use a specific version.
On Linux, you often have the binaries with full name available (e.g.
'python2.6 test.py')
--
Ville M. Vainio @@ Forum Nokia
class Runwith:
def __init__(self, interpreter, code,
cleanup=True, autorun=True,)
def _prepare_run
def _normalize_code
def run
def _report
def _cleanup
it writes a file to disk, makes it executable, runs it, captures
exitcode, err and output, removes the files, provides reports.
This provides complete decoupling from Leo.
I have run-bash and run-python buttons in Leo which run the node
contents as shell or python.
I'm liking it a lot.
I'm currently extending it to provide command line sugar:
$ rw ln -s /home/ktenney/work/src/project/bin/myscript
/home/ktenney/bin --makelink.sh--
The "rw" script executes the command, and creates the script makelink.sh
> --
> You received this message because you are subscribed to the Google Groups "leo-editor" group.
> To post to this group, send email to leo-e...@googlegroups.com.
> To unsubscribe from this group, send email to leo-editor+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
>
>
Sounds like a great solution. Could you send me the code? I'd like
to make it a part of Leo's docs, and put it somewhere like
scripts.leo. Thanks.
Edward
> Sounds like a great solution. Could you send me the code?
Kent just sent the code. It's presently in an action item. To be
transferred asap to one or more places, including contrib branch.
Edward