473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Better way of getting parsed Python rather than an AST?

Can anyone recommend something which will do one of the
following:

1) Parse a Python file into an "object-oriented" syntax
tree of some sort (eg. with function definitions represented
by a "FunDef" class, etc.)

or

2) Take an AST as produced by the Python AST module, and
convert it into a "friendlier" form. Unless I'm missing something,
the builtin AST representation seems somewhat, um, low-level.

I try to check the newsgroup regularly, but email as well as
a posting response would be greatly appreciated.

Thanks,
Ken McDonald
ke****************@sbcglobal.net
Jul 18 '05 #1
1 1239
[Kenneth McDonald]
2) Take an AST as produced by the Python AST module, and convert it
into a "friendlier" form. Unless I'm missing something, the builtin
AST representation seems somewhat, um, low-level.


Use the `compiler' module, standard in Python 2.3. It has tiny problems,
but overall, it is fairly useful.

--
François Pinard http://pinard.progiciels-bpi.ca
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
3
by: Tim Hoffman | last post by:
Hi I have been using object crafts csv module for quite a few projects, mainly because I found the csv in python in it's current incarnation is funtionally inferior to object crafts. The object...
6
by: melanieab | last post by:
Hi, Easy question. It seems to me that I'm following the examples correctly, but apparently I'm not. I'm trying to retrieve the data from a row called "row" and a column called "File". This is...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
43
by: Rob R. Ainscough | last post by:
I realize I'm learning web development and there is a STEEP learning curve, but so far I've had to learn: HTML XML JavaScript ASP.NET using VB.NET ..NET Framework ADO.NET SSL
4
by: Franck Y | last post by:
Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to...
0
by: =?iso-8859-1?q?C=E9dric_Lucantis?= | last post by:
Le Thursday 19 June 2008 18:14:03 Calvin Cheng, vous avez écrit : I don't think this is a python problem. Unlike dos, unix (and cygwin) dont look for executables in the current dir by default....
28
by: Joey Martin | last post by:
One of my servers got hacked with the SQL injection due to poor coding. So, I had someone write a stored procedure and new code. But, to me, it looks just as flawed, even using the stored...
4
by: poisonedapple | last post by:
Hi , I have posted this in one of my other thread but I am posting it again since it is infact on a different topic I got the table extracted and I have a huge document full of tables. From...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.