Spe: Python IDE for Blender released

Download it from: http://projects.blender.org/projects/spe

Screenshots:
http://stani.host.sk/python/spe.png
http://stani.host.sk/python/blenpy.html

For those who never heard of spe:

Stani’s Python Editor (spe)
An attempt for a plausible Python IDE for Blender and abroad.
© 2003 http://www.stani.be

Installation:
Type ‘python setup.py install’
(For more details see README.txt in distribution.)

Requirements:
Python22
wxPython-2.4.0.7u
Blender 2.27

Contents:
Features
Some useful information (see below!)
General issues
Linux issues

Features:

Sidebar per file
*class/method browser (jump to source)
*automatic todo list, highlighting the most important ones (jump to source)
*automatic alphabetic index of classes and methods (jump to source)
*notes

Tools:
*interactive shell
*locals browser (left click to open, right click to run)
*seperate session recording
*quick access to python files in folder and its subfolders (click to open)
*unlimited recent file list (left click to open, right click to run)
*automatic todo list of all open files, highlighting the most important ones
(jump to source)
*automatic alphabetic index of all open files (jump to source)

Python related:
*sytax-checking
*syntax-coloring
*auto-indentation
*auto-completion
*calltips

Drag & Drop: drop any amount of files or folders…
*on main frame to open them
*on shell to run them
*on recent files to add them
*on browser to add folders

General
*context help defined everywhere
*add your own menus and toolbar buttons
*exit & remember:all open files will next time automatically be loaded
(handy for Blender sessions)
*wxPython gui, so should be cross-platform (Windows,Linux,Mac)
*scripts can be executed in different ways:run,run verbose & import
*after error jump to line in source code
*remember toggle:remembers open files between sessions.

last but not least…

Blender related:
*redraw the Blender screen on idle (no blackout)
*Blender object tree browser (cameras,objects,lamps,…)
*add your favorite scripts to the menu
*100% Blender compatible:can run within Blender, so all these features are
available within Blender


Some usefull information:
It is recommended to check out all the context help, to get familiar with the
features of spe. Some information which didn’t fit there, comes here:

*Blender:
To run spe from within Blender, just type:

import spe
spe.main()

…and press Alt-P When spe is active, the Blender screen will always be
redrawn automatically. So the results of any command you type in the
interactive shell or of any program you run within spe, will be visible in the
Blender window. Unfortunately it is not possible to interact with Blender
directly when Spe is active. So it is impossible to rotate for example the view
with the mouse. (Maybe one time the Python development team could solve this
issue and let run blender and spe in parallel. However this might be an
illusion.)

*Psyco:
If you don’t know the python psyco module, you can ignore this item, as it won’t
have any effect for you. Psyco programs can’t run in spe, as they disable the
‘locals()’ function. Of course you can edit programs using psyco in spe, but if
you want to run them, comment the psyco activation code out.

*Refreshing:
Spe has a lot of features like explore tree,index,todo list, and so on…
This updated every time the file is saved or every time the refresh command is
given. This can be done by pressing F5 on the keyboard, the refresh toolbar
button or clicking the View>Refresh menu.

*Remember option:
This can be activated by checking File>Remember or by pressing the heart toolbar
button. It will open automatically the scripts which were open in the last
session. Useful for Blender if you have to switch continously between Blender
and spe.

*Running files:
Spe provides many ways to run files:
-Run (F9):
Use this by default, unless you have specific reasons to use the other
ones. It will run in the namespace of the interactive shell. So all the
objects and functions of your program become available in the shell and in the
locals browser (the tab next to the shell).
-Run with profile (Ctrl-P):
Same as above but with a profile added. A profile is a report
of the program execution which shows which processes or functions are time
consuming. So if you want to speed up your code, you can define the priorities
based on this report.
-Run in seperate namespace (Ctrl-R):
Like run, but all the objects and functions defined by the program will not
become available in the namespace of the interactive shell. Instead they will
be defined in the dictionary ‘namespace’ of the interactive shell. So if the
file ‘script.py’ is run in this way, type namespace[‘script.py’] in the shell,
to access this dictionary, or namespace[‘script.py’].keys() to get a list of
all defined names, or namespace[‘script.py’].items() to get tuples of all the
names and their values. More easy is to just browse ‘namespace’ in the locals
browser.
-Run verbose (Alt-R):
This is for very simple programs, which do not indent more than once. It will
send all source lines, as if they were typed in the interactive shell. It is
probably a good learning tool for beginners.
-Import (F10):
Imports the source file as a module.
->For running files, they don’t have to be saved. For importing files, it is
recommended to save them first.

*Syntax-checking:
Every time you save spe does syntax checking. If there is any error, spe will
jump to the line in the source code and try to highlight the error.


General issues:

  • Undo might sometimes takes big steps back.
  • editors.txt describes possibly installed editors. It may not work 'out of the

box’ for many people. If so adapt the file to your system.

Linux issues:
*unicode:
There might be problems when wx lib is compiled with unicode/gtk2, since
spe uses wxSTC. One user reported that she recently compiled wx 2.4.0 with it
and the scintilla widget didn’t work at all.

I get: (when I run python spe.py)

Starting Spe…
Importing modules…
/usr/lib/python2.2/site-packages/sm/wxp.py:24: UserWarning: PyCrust has been renamed to Py. Use ‘from wx import py’
from wxPython.lib.PyCrust import crust,shell, filling
Traceback (most recent call last):
File “spe.py”, line 14, in ?
import framework.wxMDIParentFrame1 as wxMDIParentFrame1
File “framework/wxMDIParentFrame1.py”, line 11, in ?
import parentInit
File “framework/parentInit.py”, line 6, in ?
import sm.wxp
File “/usr/lib/python2.2/site-packages/sm/wxp.py”, line 78, in ?
class SmCrust(crust.Crust):
File “/usr/lib/python2.2/site-packages/sm/wxp.py”, line 82, in SmCrust
revision = crust.revision
AttributeError: ‘module’ object has no attribute ‘revision

I am on linux, madrake 9.1 have wx, python 2.2 and blender 2.26-2.27

Hi Sutabi,
The problem is that you use the new version of wxPython. Spe works with version wxPython-2.4.0.7 Unfortunately wxPython is often not consistent from release to release. Probably somewhere in the end of august the version of Spe will be updated to the new wxPython
If you really want to try spe, you have to download and install the other version of wxPython.
Sorry for that,
Stani

Please post any problems to the spe forum:
http://projects.blender.org/forum/forum.php?forum_id=102
Stani

I like this IDE very very very very much …

Two fonctions I miss are:

  • Refactor (rename a function and it is renamed everywhere it is referenced)
  • Autocomment (when asked, the program auto generates an empty epydoc compatible comment at the beginning of the function with already prepared @param and @return lines)

SPE really is a marvellous tool !!!

thank you very much STANI … and congratulations

Jean-Baptiste

I really don’t think this is relevant any more :slight_smile: This thread is more than 3 years old.

Haha, it still relevant as refactoring is planned to go inside SPE, probably in april.

Follow SPE’s development at the blog:

http://pythonide.stani.be

I don’t visit this forum frequently, so you better leave a comment on my blog. To show support for SPE, please digg blog posts.

Thanks!

Stani