I am programming in python on a pre-existing pylons project (okfn ckan), but I am involved in trading and am used to it.
Please correct me if I make false statements:
In the pylons it seems like I have to say
$ paster serve --reload
to get a web server that will notice the changes.
At this point, I can change the function, save the file, and then go to my browser to check the change.
If I want to examine variables in a function in the process of creating a web page, then I put a hi raise, and then when I load the page, I get a browser-based debugger in which I can check the program,
This is all very nice and works smoothly, and I get the impression that this is how people tend to write pylon code.
Unfortunately, the reboot takes a few seconds, and it continues to break my train of thought.
What I would like to do is start the web server from emacs (although the python REPL on the command line will be almost as good), so that I can change the function in the editor and then send new code to start without restarting it. (with the replacement of the command line, I think I would have to copy and paste a new thing, but it would also be doable, a little less convenient)
Python seems very dynamic and in many ways similar to lisp, so I see, in principle, no reason why this will not work.
So, I think the question is:
Is anyone familiar with the lisp method of doing things with Pylons, and can they tell me how to program the lisp method in pylons? Or is this impossible or a bad idea for some reason?
Edit:
- python emacs :
from paste.script.serve import ServeCommand
ServeCommand("serve").run(["development.ini"])
, , :
import pdb
pdb.set_trace()
, , - - , REPL, .
def start_server():
from paste.script.serve import ServeCommand
ServeCommand("serve").run(["development.ini"])
server_thread=threading.Thread(target=start_server)
server_thread.start()
, , REPL, -. - , ?