468,101 Members | 1,360 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

Python Debugger / IDE ??

Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks

Mar 14 '06 #1
20 3837

krypto.wiz...@gmail.com wrote:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks


I've always been happy with the debugger in PythonWin. You can even
use:

from pywin.debugger import set_trace;set_trace()

to bring up the debugger directly from a script that wasn't originally
run in the ide.

Mar 14 '06 #2
kr***********@gmail.com:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.


Here's a recent thread about IDEs:
http://groups.google.nl/group/comp.l...9604e225252ad4

--
René Pijlman
Mar 14 '06 #3
>Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.


I've been using Eclipse with PyDev and am very happy with it.

Mar 14 '06 #4
kr***********@gmail.com wrote:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks

If you don't mind spending (not so much) money, ActiveState's Komodo
is a nice debugger. With it you can even debug a Python program on
a remote machine over a network connection (ideal for GUI problems).

--Scott David Daniels
sc***********@acm.org
Mar 14 '06 #5
kr***********@gmail.com wrote:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.


pythonic "debugging" in three steps:

1/ unit tests
2/ a bunch of print statements
3/ the interactive python shell

All this relying on well-decoupled, modular code.

FWIW, I've almost never used a debugger with Python.

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Mar 14 '06 #6
My code has got big and it is an iterative program. I use print
statements but I thought I could get something handy it would be useful
to me.

thanks

Mar 14 '06 #7
kr***********@gmail.com wrote:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

Every help is greatly appreciated.

Thanks

I've found that using logging works well for me. I put statements in
my program that log information, trace, intermediate results, ..., and
wrap them in trace/debug if statements. Higher values of debug get more
"stuff" logged. Then I leave everything in the program. When something
goes wrong, run it with debug level and I can figure out what is
happening. This is especially good when problem pops up 2 years from
now. I just have client run with debug=4 and I look at the logfile. If
you get in a habit of writing ALL your software this way, you find that
it is quite powerful and easy. I haven't found the overhead of all the
if statements to be anything to worry about. You can use the standard
library logging module (I wrote my own before it was available and I've
never changed to the one in the standard library).

-Larry Bates
Mar 14 '06 #8
Em Ter, 2006-03-14 Ã*s 09:44 -0800, da********@yahoo.com escreveu:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.


I've been using Eclipse with PyDev and am very happy with it.


I second that. It's the best Python IDE I've ever used. But you won't
get too far with less than 512 MiB of RAM...

--
"Quem excele em empregar a força militar subjulga os exércitos dos
outros povos sem travar batalha, toma cidades fortificadas dos outros
povos sem as atacar e destrói os estados dos outros povos sem lutas
prolongadas. Deve lutar sob o Céu com o propósito primordial da
'preservação'. Desse modo suas armas não se embotarão, e os ganhos
poderão ser preservados. Essa é a estratégia para planejar ofensivas."

-- Sun Tzu, em "A arte da guerra"

Mar 14 '06 #9
ol*****@verizon.net wrote:
I've always been happy with the debugger in PythonWin. You can even
use:

from pywin.debugger import set_trace;set_trace()

to bring up the debugger directly from a script that wasn't originally
run in the ide.

I use that one also.
There is also Boa (http://boa-constructor.sourceforge.net/), available
both in Linux and Windows, and with the avantage of having a separate
process for the debugging unit, which is great when you have to explore
some unsane scripts.
Regards
jm
Mar 15 '06 #10
bruno at modulix wrote:
FWIW, I've almost never used a debugger with Python.

It's pourtant very simpa from time to time !
Mar 15 '06 #11
kr***********@gmail.com schrieb:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.


You can try out PyScripter, a relatively new Python IDE that is
completely free and has nice debugging and unit testing facilities.

The latest version is available here:
http://mmm-experts.com/Downloads.asp...ersionInfo=yes

-- Christoph
Mar 15 '06 #12
I like the Pyscripter, is there any Linux version or something of it.
Christoph Zwerschke wrote:
kr***********@gmail.com schrieb:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.


You can try out PyScripter, a relatively new Python IDE that is
completely free and has nice debugging and unit testing facilities.

The latest version is available here:
http://mmm-experts.com/Downloads.asp...ersionInfo=yes

-- Christoph


Mar 15 '06 #13
kr***********@gmail.com wrote:
I like the Pyscripter, is there any Linux version or something of it.


Sorry, I forgot to mention that there is a snag in it. Since PyScripter
is based on Python for Delphi, it is available for Windows only.

-- Christoph
Mar 15 '06 #14
kr***********@gmail.com a écrit :
My code has got big
How big ? More than 50 kloc ?-)

Big project doesn't imply long functions nor fat classes.
and it is an iterative program.


Sorry, I don't understand what you mean by "iterative" here.

Mar 15 '06 #15
Can you please point some good documents (need not be Python specific)
on best practices with writing code this way ?

Thanks,
Ritesh

Mar 16 '06 #16
Christoph Zwerschke wrote:
kr***********@gmail.com wrote:
I like the Pyscripter, is there any Linux version or something of it.

Sorry, I forgot to mention that there is a snag in it. Since PyScripter
is based on Python for Delphi, it is available for Windows only.


Is there a free or low-cost version of Delphi for Windows available
anywhere?

Pyscripter looks interesting but when I went to the Borland site to find
out about the cost of Delphi I went into catatonic shock. They can't be
serious.

Then I read on Wikipedia that "On February 8th, 2006, Borland announced
that it was looking for a buyer for its IDE and Database line of
products, which included Delphi, to concentrate on its Application
Lifecycle Management line."

So I guess it is at the end of its life, at least with Borland. Maybe
they will FOSS it? Nah...

Don.

Mar 16 '06 #17
Don Taylor wrote:
Is there a free or low-cost version of Delphi for Windows available
anywhere?

<snip>

There used to be a Delphi 6 Personal Edition that was available free
(for non-commercial use). You might still find it around somewhere.

Rowdy

Mar 16 '06 #18
bruno at modulix wrote:
kr***********@gmail.com wrote:
Is there any editor or IDE in Python (either Windows or Linux) which
has very good debugging facilites like MS VisualStudio has or something
like that.

I like SPE but couldn't easily use winPDP. I need tips to debug my code
easily.

pythonic "debugging" in three steps:

1/ unit tests
2/ a bunch of print statements
3/ the interactive python shell

All this relying on well-decoupled, modular code.

FWIW, I've almost never used a debugger with Python.


Thats a good socket for Python.
Arduos step-in debugging, big tedious remote debugging sessions etc. are
not really Pythonic. For complex things like GUI's and application
servers its a weak practice.

logs, postmortem debugging and ad-hoc debugging are the things to go next.

so its good when you can do .pm() .set_trace() to call the debugger
from the nature of your program. (And not: "The the debugger now calls
the app, once my level of anger raised beyond a certain limit").

For example with callable debuggers like pdb and also Pythonwin
(Pythonwin debugger "pywin.debugger.pm()" e.g. can be raised as simple
from normal apps / shell ) I simply do this in apps regularly:

if debug: sys.excepthook = excepthook_my_debugger

As soon as stuff crashes down (even in GUI message handlers) during all
of the development cycle: you have your fingers and cursor automatically
& immediatly at the stack context. That does >99% of usual python code
cooking. The rest is maybe for a (slow) breakpoint "b"

Unfortunately such method is not encouraged and exposed (clearly) in the
big IDE's. Those' overall style is a lazy copy of C, Java "I do"-hacker
history. Im curious much about their value at all. Keep it simple and
let Python do.

Robert


Mar 17 '06 #19
Don Taylor wrote:
Is there a free or low-cost version of Delphi for Windows available
anywhere?


I don't know (never used Delphi actually). Anyway, you don't need to
have Delphi to use PyScripter, and PyScripter is completely free.
However, it will only run on Windows because it is developed with
Delphi. The advantage is that it is noticeably faster than most other
free Python IDEs written in Python.

-- Christoph
Mar 29 '06 #20
Don Taylor wrote:
Is there a free or low-cost version of Delphi for Windows available
anywhere?


Sure.

If my memory serves me correctly, I have several CDs from various
computer magazines with previous versions of Delphi at home. I don't
know if such offers have been around recently, but you could check
some computer magazines with included CDs or DVDs.

Borlands web site currently says: "Please note that Delphi 2005
Personal is only distributed through select publications, and is not
available for download."

Google for more info... See e.g.
http://www.delphigamedev.com/2005_04...29746345094436
http://blogs.slcdug.org/rhordijk/arc...2/12/1114.aspx

See also:
http://groups.google.se/group/borlan....non-technical
Mar 30 '06 #21

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

30 posts views Thread by David Mertz | last post: by
4 posts views Thread by Glenn Reed | last post: by
34 posts views Thread by Erik Johnson | last post: by
6 posts views Thread by Tran Tuan Anh | last post: by
17 posts views Thread by hanumizzle | last post: by
40 posts views Thread by kimiraikkonen | last post: by
12 posts views Thread by WaterWalk | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.