jEdit Community - Resources for users of the jEdit Text Editor
newbie Q: how to Run Buffer using Python?
Submitted by midtoad on Thursday, 9 March, 2006 - 00:40
When I try to "run this buffer", I get an error saying "there is no interpreter associated with this buffer. You can specify interpreters on a mode-specific basis in the Utilities -> Global Options dialog box."

It's certainly helpful to get a suggestion in a case like this. But there is NO place in the Global Option s that I can find where I can specify a Python interpreter.

What's the best way to execute a python script with one click of a toolbar icon?

thanks
S
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
several aspects
by Robert Schwenn on Sun, 12/03/2006 - 14:41
1. "Run this buffer" is an action of console plugin. So it's a bug in the help of this plugin - it's meant "Plugin Options - Console - Compile and Run". (further Details)

2. For integrated support of Python look at JythonInterpreter plugin and Python Debugger plugin

3. Try start the macro "misc/Run_Script.bsh" when the python script to start is Your active buffer. If python script do not start properly, You may edit Run_Script.bsh. It's a simple script, wich determines a system command depending on the current editmode. Only Beanshell scripts are evaluated internally...

4. Best way to run ...?
I'd prefer Beanshell script "Run_Script.bsh", because You can run whatever script You want in the same way. Map a Key-Shortcut to the macro and/or a toolbar button (Global Options Smiling - Toolbar). Maybe You have to edit the macro for Your needs.

Robert

User login
Browse archives
« September 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   96500
Context Free Art (*.cfdg)   0.31   46061
BBEdit scheme   1.0   18600
JBuilder scheme   .001   18501
ColdFusion scheme   1.0   18030
R Edit Mode - extensive version   0.1   17480
Advanced HTML edit mode   1.0   16212
Matlab Edit Mode   1.0   16074
jEdit XP icons   1.0   15235
XP icons for jEdit   1.1   14299