Greetings,

On Nov 6, 2007 4:15 AM, Timmie <[EMAIL PROTECTED]> wrote:
> Hello,
> I am stepping forward into learning python and write my first programs now.
> To facilitate my development I have a question:
>
> Is there a tool which I can run on my code and then get a flow chart from it 
> or
> visualize its structure in another form?
>

I have found that a very simple and inexpensive way to look at Python
code while it's running is to insert a couple of lines in the code at the
points you want to look at:

print variableName
raw_input("Pause")

The 'print variableName' will print the value the variable is pointing to,
and 'raw_input("Pause") acts like a breakpoint, stopping program execution
so you can check out what's happening. Two other items of interest are:

dir (itemName)
type (itemName)

Both are extremely helpful when you're first learning Python. They're useful
for discovering the modules and attributes in classes, and checking the
type of objects.

You can use these in addition to any graphical output tools you find.

(Just Another Noob.)
-- 
b h a a l u u at g m a i l dot c o m
http://www.geocities.com/ek.bhaaluu/python/index.html

>
> There was a discussion about that soem time ago.
> OT: Flow chart -
> http://news.gmane.org/find-root.php?message_id=%3c1103452504.92b04ebcjerimed%40myrealbox.com%3e
>
> Is there any solution that can be used without leaning UML?
>
> Kind regards,
> Timmie
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to