PDA

View Full Version : Python and Bluefish editor



jis
April 17th, 2008, 03:15 PM
I tried to edit a python program by Bluefish in Gutsy, but it indented text so that the program could not be run (even if it looked okay). I edited further in nano and fixed the indention there. Anybody else have noticed this kind of behavior in Bluefish editor?

LaRoza
April 17th, 2008, 03:17 PM
Isn't Bluefish for (X)HTML?

SanskritFritz
April 17th, 2008, 03:19 PM
I tried to edit a python program by Bluefish in Gutsy, but it indented text so that the program could not be run (even if it looked okay). I edited further in nano and fixed the indention there. Anybody else have noticed this kind of behavior in Bluefish editor?Check the settings for automatic tab or space inserting. I say dont use tabs, as there is no standard for tab witdths, any editor can interpret them differently, and this can screw the python interpreter.

LaRoza
April 17th, 2008, 03:21 PM
Four spaces is standard for Python.

jis
April 17th, 2008, 03:27 PM
LaRoza: It is maed to support many programming languages, including Python, as document types.

SanskritFritz: There is "Use spaces to indent, not tabs" checkbox in editor preferences. I am not sure, if it was checked when I experienced the problem. I hope not. Now it is.

LaRoza
April 17th, 2008, 03:28 PM
LaRoza: It is maed to support many programming languages, including Python, as document types.

SanskritFritz: There is "Use spaces to indent, not tabs" checkbox in editor preferences. I am not sure, if it was checked when I experienced the problem. I hope not. Now it is.

Mixing tabs and spaces causes issues. It is best (IMO) to have all spaces, but all tabs works also.

ryanhaigh
April 17th, 2008, 03:41 PM
I haven't used bluefish for editing python scripts but the editor i do use geany has the ability to convert tabs to spaces, I believe you can even customize the number of spaces. Perhaps bluefish has such a feature?