[issue9621] Graphviz output for 2to3 fixer patterns

2010-12-02 Thread Matt Bond

Matt Bond  added the comment:

Sorry for the delay in responding, and for getting this patch cleaned up and 
submitted.

While I was going through my code to submit it, I found a couple of additional 
issues with it. Then I ended up becoming very busy with my grad courses. As a 
result, I haven't had a chance to do anything with it. Currently, my plan is to 
rework it over the winter break to fix the issues, make it work correctly with 
python 3, and remove the dependence on the external graphviz package (which 
should resolve the import issue as well).

--

___
Python tracker 
<http://bugs.python.org/issue9621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-29 Thread Matt Bond

Matt Bond  added the comment:

Huh. I must have diffed the wrong version of my code - how embarrassing!

I'll update the attached patch later this week. Thanks for catching that.

--

___
Python tracker 
<http://bugs.python.org/issue9621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-22 Thread Matt Bond

Matt Bond  added the comment:

As requested, attached is the output for the fix_buffer fixer, as an example of 
the kind of output this patch can produce.

--
Added file: http://bugs.python.org/file18968/fix_buf_pytree_1.png

___
Python tracker 
<http://bugs.python.org/issue9621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9621] Graphviz output for 2to3 fixer patterns

2010-09-21 Thread Matt Bond

Matt Bond  added the comment:

Éric,

When I was working with 2to3 this summer I was running it via python3, so I 
think the patch should work - however, if I've submitted it to the wrong place 
or the wrong branch, where should I be looking at to ensure my code does work 
on 3.2 and is submitted to the right place?

In regard to the import gvgraph, I wasn't sure what to do with it - for my 
distribution gvgraph wasn't available as a package, and it was only one file so 
I just dumped it in the same directory as the script. I'm open to suggestions 
as to how that import should be handled better.

Alexander - I'll attach a sample image as soon as I get back to my development 
machine, which should be later this week.

--

___
Python tracker 
<http://bugs.python.org/issue9621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9621] Graphviz output for 2to3 fixer patterns

2010-08-16 Thread Matt Bond

New submission from Matt Bond :

As part of my GSoC project working on 2to3, I've created a script which will 
allow compiled fixer patterns to be visualized using graphviz. This would be 
useful for debugging and understanding exactly how patterns are matched. I've 
written using the 2to3 sandbox as my base.

The script is named pat2dot and is found in the scripts directory. The script 
currently relies on an external graphviz library (I provided bindings for the 
GvGen library with this patch), they are separated enough from the rest of the 
code that it would be trivial to create a class that would work using a 
different graphviz library. Additionally, since the code is never called within 
2to3 proper, this dependency will only appear if you wish to use pat2dot, and 
will not affect any other usages of lib2to3.

Usage of the script is `python pat2dot.py fixername` where fixername is any 
fixer provided in 2to3, as named by 2to3's -l option.

--
components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3-graph.diff
keywords: patch
messages: 114049
nosy: facundobatista, gmattbond, loewis
priority: normal
severity: normal
status: open
title: Graphviz output for 2to3 fixer patterns
versions: Python 2.6
Added file: http://bugs.python.org/file18544/2to3-graph.diff

___
Python tracker 
<http://bugs.python.org/issue9621>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8029] bug in 2to3 dealing with "print FOO, " followed by "sys.stdout.write('')"

2010-04-07 Thread Matt Bond

Matt Bond  added the comment:

I've attached a patch that fixes this particular idiom as well as a problem 
with the handling of bare 'print' statements. It also includes updated tests 
for these issues.

--
keywords: +patch
nosy: +zxaos
Added file: http://bugs.python.org/file16812/fix8029.patch

___
Python tracker 
<http://bugs.python.org/issue8029>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com