Does anyone else here use emacs? If so, perhaps you can tell me whether
it's possible -- with the python-mode enabled -- to run the application from
within the editor. This would be instead of switching to a virtual console
and running 'python application.py'.
Just curious,
Rich
···
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Richard,
I don't know about emacs, but using python-mode in xemacs, you run the application by invoking ctrl-c ctrl-c.
Hank
Rich Shepard wrote:
···
Does anyone else here use emacs? If so, perhaps you can tell me whether
it's possible -- with the python-mode enabled -- to run the application from
within the editor. This would be instead of switching to a virtual console
and running 'python application.py'.
That opens an 'Execute buffer,' but it seems to want to run only the
loaded module. When I open that second buffer and type in 'python
appname.py' it just sits there and does nothing.
FWIW, I run emacs in its own virtual console under X11, so it should work
essentially the same as xemacs.
Thanks,
Rich
···
On Wed, 7 Feb 2007, Hank Knox wrote:
I don't know about emacs, but using python-mode in xemacs, you run the
application by invoking ctrl-c ctrl-c.
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
What about loading the application.py into a buffer and running that?
Hank
Rich Shepard wrote:
···
On Wed, 7 Feb 2007, Hank Knox wrote:
I don't know about emacs, but using python-mode in xemacs, you run the
application by invoking ctrl-c ctrl-c.
Hank,
That opens an 'Execute buffer,' but it seems to want to run only the
loaded module. When I open that second buffer and type in 'python
appname.py' it just sits there and does nothing.
FWIW, I run emacs in its own virtual console under X11, so it should work
essentially the same as xemacs.
Does anyone else here use emacs? If so, perhaps you can tell me whether
it's possible -- with the python-mode enabled -- to run the application from
within the editor. This would be instead of switching to a virtual console
and running 'python application.py'.
Yes, I'm a longtime Emacs user. Check out the "Python" menu item for different options in executing the current buffer, or the region, or a single command. One downside of executing an app this way is that you don't see the output until the app closes, and it's hard to impossible to interrupt the app from within Emacs. For that reason, I often use a shell window (with the "-u" option to convince the interpreter that it's running in a console).
Does anyone else here use emacs? If so, perhaps you can tell me whether
it's possible -- with the python-mode enabled -- to run the application from
within the editor. This would be instead of switching to a virtual console
and running 'python application.py'.
Yes, you can run python (including a wx app) from within emacs, if you're running the GUI version just look on the python menu when you have a .py file loaded. The only trouble is that python-mode's "execute buffer" and similar functions expect you to be running a quick script that returns quickly, so it blocks Python until the script returns, and then puts the output into a buffer. This doesn't play well with wx apps which tend to run longer than that. Another way to do it is to just run a normal shell in an Emacs buffer (M-x shell) and then launch your apps from there instead of the console window.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Yes, you can run python (including a wx app) from within emacs, if you're
running the GUI version just look on the python menu when you have a .py
file loaded. The only trouble is that python-mode's "execute buffer" and
similar functions expect you to be running a quick script that returns
quickly, so it blocks Python until the script returns, and then puts the
output into a buffer. This doesn't play well with wx apps which tend to
run longer than that. Another way to do it is to just run a normal shell
in an Emacs buffer (M-x shell) and then launch your apps from there
instead of the console window.
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863