Syntext Forums - Serna Enterprise XML Editor, Serna Free XML Editor
(#1 (permalink))
Old
Junior Member
 
Posts: 15
Join Date: Apr 2009
Default Python Dev Environment - 06-11-2009, 04:53 PM

Hello,

I'm exploring the Python customization possibilities of Serna. Although I've been studying the source code of the supplied plugins, I'm new to both Serna and Python.

What development/debugging methods are most helpful? Text editor and pdb? Others?

I'd like to perform stack traces, set breakpoints, etc.

Regards,

John
Reply With Quote
(#2 (permalink))
Old
Administrator
 
Posts: 39
Join Date: Mar 2009
Default 06-11-2009, 08:06 PM

The important tip, and it is not obvious, is to restart Serna when you have modified the source code of your plugin, otherwise the changes will have no effect. Reloading the document is not enough.

As for debugging, personally I use "print" as a best debugger
Reply With Quote
(#3 (permalink))
Old
Junior Member
 
Posts: 15
Join Date: Apr 2009
Default PDB hangs Serna - 06-26-2009, 07:37 PM

Hi Timofey,

I know that the print statement can be my friend, but there are cases when I'd rather not have to instrument my code to perform basic operations such as setting breakpoints, single-step, step-into, step-out, etc.

Even though you prefer the print statement, I just wanted to know if you can tell me if the pdb package indeed does work in Serna's environment. I looks like I can import the package, but when I tried a few pdb commands, it just hangs Serna.

Regards,

John
Reply With Quote
(#4 (permalink))
Old
Administrator
 
Posts: 39
Join Date: Mar 2009
Default 06-29-2009, 01:56 PM

Quote:
Originally Posted by kirkilj View Post
Hi Timofey,

Even though you prefer the print statement, I just wanted to know if you can tell me if the pdb package indeed does work in Serna's environment. I looks like I can import the package, but when I tried a few pdb commands, it just hangs Serna.

Regards,

John
I don`t use pdb, maybe it waits for some user input and thus hang Serna.
By the way, in a day or two Serna Free will be available as an open source software, so you will be able to trace the problem.

Timofey.
Reply With Quote
(#5 (permalink))
Old
Junior Member
 
Posts: 15
Join Date: Apr 2009
Default 06-29-2009, 02:41 PM

Timofey,

Two questions:

(1) Will the Enterprise version also be open source or just the free version? From your banner announcement on your website, it only mentions the Free version.

(2) What type of development environment/language is used for the core Serna modules?

John
Reply With Quote
(#6 (permalink))
Old
Junior Member
 
Posts: 15
Join Date: Apr 2009
Default WinPDB and Serna? - 06-29-2009, 10:24 PM

There's an alternative to pdb, called winpdb. It has a mode for attaching to embedded Python interpreters. I'll give it a try with Serna, but wondered if anyone has tried this already.

Winpdb - A Platform Independent Python Debugger Embedded Debugging

Regards,

John
Reply With Quote
(#7 (permalink))
Old
Administrator
 
Posts: 39
Join Date: Mar 2009
Default 06-30-2009, 01:24 PM

Quote:
Originally Posted by kirkilj View Post
Timofey,

Two questions:

(1) Will the Enterprise version also be open source or just the free version? From your banner announcement on your website, it only mentions the Free version.

(2) What type of development environment/language is used for the core Serna modules?

John
1. Serna Enterprise source code will be available for the paid customers.
2. Serna core is written in C++. Some plugins are also written in C++, others - in Python.

Timofey.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.1
vBulletin Skin developed by: vBStyles.com