These are chat archives for evhub/coconut

26th
Sep 2016
Evan Hubinger
@evhub
Sep 26 2016 01:21
@capitanhaddock @chuckwondo @malkarouri There have been a lot of questions here about using coconut in a shebang properly, so I opened and resolved #178. If you now pip install coconut-develop to get the latest development coconut, you will be able to use a shebang of #!/usr/bin/env coconut-run which will automatically do the right thing. I've added documentation for this as well and it will be included in the next release.
Archibaldo Haddock
@capitanhaddock
Sep 26 2016 02:36
Installed coconut-develop and can confirm that #!/usr/bin/env coconut-run -n works as a perfect (and silent) replacement for python in scripts. Thanks.
Archibaldo Haddock
@capitanhaddock
Sep 26 2016 02:43
Ugh, unfortunately not quite perfectly. coconut-run seems to inspect and process any args passed to the script and react to it (such as --help) instead of passing it through to the code in the script. sys.argv also contains one more arg -- -rq -- which should not be there.
Evan Hubinger
@evhub
Sep 26 2016 17:58
@capitanhaddock Nice catch! Try pip install --upgrade coconut-develop. Arguments should be properly passed on to the script now. Although you won't be able to use the -n option anymore (although you really shouldn't be, since it makes Coconut recompile the file every time it's run, which is rather slow).