* Some frameworks smartness
@ 2010-08-02 17:16 Andrea Crotti
2010-08-02 18:02 ` Andrea Crotti
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-02 17:16 UTC (permalink / raw)
To: help-gnu-emacs
I'm working with turbogears and thinking that it could be much more
simple.
I tend to forget after a while I don't use the various commands I have
to give (python setup.py update-catalog... etc) so I really think that
emacs could come into help.
I didn't find any useful packages about this or any framework in
general, but I can do it myself maybe.
Before I do maybe you have some advices or some hints on something
already done...
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Some frameworks smartness
2010-08-02 17:16 Some frameworks smartness Andrea Crotti
@ 2010-08-02 18:02 ` Andrea Crotti
2010-08-02 21:30 ` Andrea Crotti
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-02 18:02 UTC (permalink / raw)
To: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> I'm working with turbogears and thinking that it could be much more
> simple.
>
> I tend to forget after a while I don't use the various commands I have
> to give (python setup.py update-catalog... etc) so I really think that
> emacs could come into help.
>
> I didn't find any useful packages about this or any framework in
> general, but I can do it myself maybe.
>
> Before I do maybe you have some advices or some hints on something
> already done...
> Thanks
Reading this nice article [fn:1] I started to write something.
First we have to activate the correct python executable, so
--8<---------------cut here---------------start------------->8---
(require 'python-mode)
(defun virtual-set-interpreter ()
(interactive)
(let
((interpreter (expand-file-name "bin/python")))
(if
(file-exists-p "bin/python")
(progn
(message "setting the local interpreter")
(setq py-python-command interpreter))
(message "not found"))))
(defun virtual-deactivate ()
(interactive)
(message "deactivate the environment")
(py-toggle-shells 1))
(provide 'virtual)
--8<---------------cut here---------------end--------------->8---
Even though I'm not sure is a good idea to change globally the python
interpreter.
On other buffers I still maybe would like to use the default cython, how
can it be done in a less intrusive way?
Then maybe I have to setup the exec path also and some commands which
are shortcuts for the various operations normally done...
Footnotes:
[fn:1] http://jesselegg.com/archives/2010/03/14/emacs-python-programmers-2-virtualenv-ipython-daemon-mode/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Some frameworks smartness
2010-08-02 18:02 ` Andrea Crotti
@ 2010-08-02 21:30 ` Andrea Crotti
2010-08-03 7:27 ` Tassilo Horn
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-02 21:30 UTC (permalink / raw)
To: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
I then found that the wonderful make-comint to create new interpreters
running, and one useful application would be to run the
"paster shell development.ini"
I tried in all the possible ways but it never finds it (and paster is in
the path).
Maybe I'm doing something wrong passing the arguments?
(setq paster-shell "./bin/paster shell ldapper/development.ini")
(defun run-turbogears ()
"Run an interactive turbogears shell"
(interactive)
(require 'comint)
(switch-to-buffer (make-comint "turbogears" paster-shell))
;; now maybe pass to the right mode
)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Some frameworks smartness
2010-08-02 21:30 ` Andrea Crotti
@ 2010-08-03 7:27 ` Tassilo Horn
2010-08-03 8:22 ` Andrea Crotti
0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2010-08-03 7:27 UTC (permalink / raw)
To: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
Hi Andrea,
> Maybe I'm doing something wrong passing the arguments?
Yes, I think you should call it like
(make-comint "turbogears" "paster" nil "shell"
"ldapper/development.ini")
and probably you should specify the ini file absolutely.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Some frameworks smartness
2010-08-03 7:27 ` Tassilo Horn
@ 2010-08-03 8:22 ` Andrea Crotti
0 siblings, 0 replies; 5+ messages in thread
From: Andrea Crotti @ 2010-08-03 8:22 UTC (permalink / raw)
To: help-gnu-emacs
Tassilo Horn <tassilo@member.fsf.org> writes:
> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>
> Hi Andrea,
>
>> Maybe I'm doing something wrong passing the arguments?
>
> Yes, I think you should call it like
>
> (make-comint "turbogears" "paster" nil "shell"
> "ldapper/development.ini")
>
> and probably you should specify the ini file absolutely.
>
> Bye,
> Tassilo
Mm no way it never finds the "shell" command, which means that the
python used is not the correct one.
But that's strange since the py-python-command points to the right
interpreter.
Also adding to the exec-path doesn't make a difference...
The idea was to have the shell always running and in another buffer keep
also the server running.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-03 8:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 17:16 Some frameworks smartness Andrea Crotti
2010-08-02 18:02 ` Andrea Crotti
2010-08-02 21:30 ` Andrea Crotti
2010-08-03 7:27 ` Tassilo Horn
2010-08-03 8:22 ` Andrea Crotti
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.