Closed stemd closed 8 years ago
I like it.
hi @stemd, maybe you already know this but I will write it anyway. Some time ago I wrote an answer about python3 usage on LT in Stackoverflow. You can check the answer here: http://stackoverflow.com/questions/28327779/running-python-3-from-light-table
I hope it helps and kudos for volunteering to maintaining it :)
That's under "better documentation for this plugin".
I saw both python-exe
and python
strings in python_compiled.js
file in Python plugin directory, but it's smarter to change something when you know what it should do, than to change and see what happens, and scratch your head when (seemingly) nothing happen. Every approach is valid, but experienced programmer sometimes choose to read the code, not always using beginner programmer loops: try-fail and try-success.
https://s-media-cache-ak0.pinimg.com/236x/53/6d/fc/536dfc6bfc75b29874ea99d67611ca44.jpg :)
@stemd Mind if I make an announcement on the mailing list (Google Groups group)? If you want to do it yourself, that's more than fine with me too!
@stemd Oh, and welcome to the team by-the-way :tada:
@kenny-evitt Please write an announcement, I'm still reading all the docs I can find, so I can start fixing issues which pain me ASAP (Ctrl+d does nothing for Python, linter in 21st century editor is must-have).
Regarding lnter, you could check out the pluggable plugin ! https://github.com/bbbates/lt-lint
@stemd Here's the plugin (ClojureScript) code that runs the Python executable:
(defn run-py [{:keys [path project-path name client venv] :as info}]
(let [n (notifos/working "Connecting..")
obj (object/create ::connecting-notifier client)
env (if venv
{"VIRTUAL_ENV" venv}
{})
env (if (:ipython-exe @python)
(assoc env "LT_IPYTHON_PATH" (:ipython-exe @python))
env)]
(proc/exec {:command (or (:python-exe @python) (:venv-py info) "python")
:args [py-path tcp/port (clients/->id client)]
:cwd (or venv project-path)
:env env
:obj obj})))
That's (one set of code) that you'd need to change to support multiple Python versions.
@stemd Welcome aboard! As you're learning more Clojure(Script) and this plugin, feel free to ping us with questions and open pull requests for discussion. Thanks for taking this on!
update Python external dependencies (that's only CodeMirror, I tried its python.js from 20.4.2016, it's working fine), as for this = LightTable/Python you have following:
When updating python's codemirror, keep in mind LT is running an older version of CodeMirror (https://github.com/LightTable/LightTable/issues/1797) in case you see some features not working. Also, please mention in the commit or in a For Commiters section like in the Clojure plugin the exact commit used to update codemirror/python.js
Thanks a lot @stemd & congratulations !!
I wrote 5 days ago in #lighttable irc channel following:
As I got zero reactions in 2 or 3 days, I mailed last commiter to this project with this and some more ideas, and got direction to open an issue here. Important part follows:
What I wanna do with this repository (first priorities):
python.js
from 20.4.2016, it's working fine), as forthis = LightTable/Python
you have following:something.py
file you have/usr/bin/env pythonX
or/usr/bin/pythonX
you would not need to change manually[:app :lt.plugins.python/python-exe "/usr/bin/pythonX"]
in your user.behaviors, that should be detected and done automatically on the fly.[:app :lt.plugins.python/python-exe "/usr/bin/pythonX"]
and[:app :lt.plugins.python/python "/usr/bin/pythonY"]
). That could be wriiten also as - starting documentation, as currently there is none - plugin simply works after installing if you have only Python2, but if you have only 3 or both Python 2 and 3 and default is 3 - there should be some documentation how to manage that situations.I'm aware that some of above is trivial for someone skilled in Clojure & LightTable & Python, but evidently none has come in last 2 years, so I would like to try. I'm skilled in Python, in Clojure not as much, but I like LightTable enough to be ready to learn a few new tricks.