PyScripter attach to blender and debug python screep`

216 views
Skip to first unread message

Marius Maximus

unread,
Sep 17, 2010, 4:31:13 PM9/17/10
to PyScripter
Hi all !

Blender is the free open source 3D content creation suite, available
for all major operating systems under the GNU General Public License.
http://www.blender.org/

In old 2.4x version blender i can use SPE or Winpdb to debug python
script.
Read this about hot to do it:
http://wiki.blender.org/index.php/Doc:Tutorials/Extensions/Python/Editors/SPE
old 2.4x version blender use python 2.6.x API

Bit new version blender 2.5 use 3.1x python API
and SPE or Winpdb can't work with blender 3.1x

Is posible to attach PyScripter and debug script internal blender ?



PyScripter

unread,
Sep 17, 2010, 7:33:22 PM9/17/10
to PyScripter
Blender is a C/C++ program that internally uses Python. The way to
integrate with SPE is to run SPE from within Blender. Since
PyScripter is not a python program this approach will not work. At
some point I plan to integrate WinPdb into PyScripter which will allow
debugging of embedded python engines such as the one used in Blender.
Till then I cannot see how this can be done.

On Sep 17, 11:31 pm, Marius Maximus <mariusz.maxi...@gmail.com> wrote:
> Hi all !
>
> Blender is the free open source 3D content creation suite, available
> for all major operating systems under the GNU General Public License.http://www.blender.org/
>
> In old 2.4x version blender i can use SPE or Winpdb to debug python
> script.
> Read this about hot to do it:http://wiki.blender.org/index.php/Doc:Tutorials/Extensions/Python/Edi...

Marius Maximus

unread,
Sep 19, 2010, 4:29:13 PM9/19/10
to PyScripter
On Sep 18, 1:33 am, PyScripter <pyscrip...@gmail.com> wrote:
> Blender is a C/C++ program that internally uses Python.  The way to
> integrate with SPE is to run SPE from within Blender.   Since
> PyScripter is not a python program this approach will not work.  At
> some point I plan to integrate WinPdb into PyScripter which will allow
> debugging of embedded python engines such as the one used in Blender.
> Till then I cannot see how this can be done.
>


If not easy is attach to Blender maybe i think about add to PyScripter
code completation for blender(python) API
Witch component/metod/class create list for "code completation"


PyScripter

unread,
Sep 19, 2010, 5:39:51 PM9/19/10
to PyScripter
Please read my response in thread
http://groups.google.com/group/pyscripter/browse_thread/thread/4da7635ff3cee1fa
which offers a high level explanation of code completion in
PyScripter.

The code completion is making use of the SynEdit component
TSynCompletionProposal. The meat of the implementation is in the
methods SynCodeCompletionExecute in frmEditor and frmPythonII for the
editor and the interpreter respectively. The editor code completion
makes use of the python source scanning code in cPythonSourceScanner
and the refactoring code in cRefactoring.

Let me say though, that since the Blender object is a an built-in
module created inside the Blender executable and only available within
Blender, I do not see an easy root to what you want to achieve. If
you can make Blender work with the stand-alone WinPdb debugger (look
at the WinPdb information about embedded debugging) , it would be
probably easier to integrate WinPdb in PyScripter, something that is
planned anyway.

Marius Maximus

unread,
Sep 20, 2010, 4:43:22 AM9/20/10
to PyScripter
On Sep 19, 11:39 pm, PyScripter <pyscrip...@gmail.com> wrote:
> Let me say though, that since the Blender object is a an built-in
> module created inside the Blender executable and only available within
> Blender, I do not see an easy root to what you want to achieve.  If
> you can make Blender work with the stand-alone WinPdb debugger (look
> at the WinPdb information about embedded debugging) , it would be
> probably easier to integrate WinPdb in PyScripter, something that is
> planned anyway.
>

Is posible ;)

I try winpdb and it works with blender. (Winpdb 1.4.8 support python
3.x recently)
I write about it in blender forum
http://blenderartists.org/forum/showthread.php?t=197856

Blender use python 3.1
Winpdb gui use python 2.6
But all works ;)

But in future better way is create integrated ide for blender

I will look in your code.
Reply all
Reply to author
Forward
0 new messages