I'm sure I'm not using the conventional names for this tool, more of a
cross-referencer?. I couldn't find it on Google, I think for this reason.
I need a tool that will go through a python module (ClientForm in this case)
and allow me to specify a starting module to parse and tell me what all it
uses.
What I'm trying to do is to take ClientForm apart enough to pull out just the
html form parsing code in it and use it elsewhere. It would be MUCH easier
when approaching someone elses code if I could see what all functions are
called by a given function, etc.
TIA,
Scott 5 3587
Scott Chapman <sc********@mischko.com> wrote in message news:<ma**********************************@python. org>... I'm sure I'm not using the conventional names for this tool, more of a cross-referencer?. I couldn't find it on Google, I think for this reason.
I need a tool that will go through a python module (ClientForm in this case) and allow me to specify a starting module to parse and tell me what all it uses.
What I'm trying to do is to take ClientForm apart enough to pull out just the html form parsing code in it and use it elsewhere. It would be MUCH easier when approaching someone elses code if I could see what all functions are called by a given function, etc.
Because python is a dynamical typed non image language there is no
tool that can do this and there never will be any (at least one that
is not using heuristics or sampled data from previous runs).
On Sat, 06 Sep 2003 16:34:21 -0700, Lothar Scholz wrote:
.... Because python is a dynamical typed non image language there is no tool that can do this and there never will be any (at least one that is not using heuristics or sampled data from previous runs).
hmmm... I think (some) static analysis may be possible. The main
thing to exclude is eval/exec but even then, yes you're right, some
programs would just have to be run to find out what they do.
I remember reading some interesting things here: http://www.python.org/doc/essays/cp4e.html
In particular:
"Cormac Flanagan and Matthias Felleisen.
Componential Set-Based Analysis.
ACM Transactions of Programming Languages and Systems"
Simon.
"Simon Burton" <si****@webone.com.au> schrieb im Newsbeitrag
news:pa****************************@webone.com.au. .. On Sat, 06 Sep 2003 16:34:21 -0700, Lothar Scholz wrote:
... Because python is a dynamical typed non image language there is no tool that can do this and there never will be any (at least one that is not using heuristics or sampled data from previous runs). hmmm... I think (some) static analysis may be possible. The main thing to exclude is eval/exec but even then, yes you're right, some programs would just have to be run to find out what they do.
It it is not only eval/exec. You can create methods dynamically. And static
analysis will already run into trouble when you import moduls dynamically.
What I do very often is "rename" a procedure, e.g. in cases as:
def pVersion1(): ...
def pVersion2(): ...
if....
p=pVersion1
This is not even tricky.
Kindly
Michael P I remember reading some interesting things here: http://www.python.org/doc/essays/cp4e.html
In particular: "Cormac Flanagan and Matthias Felleisen. Componential Set-Based Analysis. ACM Transactions of Programming Languages and Systems"
Simon.
Simon Burton <si****@webone.com.au> wrote in message news:<pa****************************@webone.com.au >... hmmm... I think (some) static analysis may be possible. The main thing to exclude is eval/exec but even then, yes you're right, some programs would just have to be run to find out what they do.
Whats with code like:
if foo:
def myfunc():
... do something
else:
def myfunc():
... calling your_func()
A Language where the program calling hierarchie depends on runtime
calculations is not able to provide good refactoring tools or static
flow analysis. This is the huge difference to a language like
Smalltalk where we live in an image.
And if you say that this is a hack, then you are making a big mistake,
look at currently used code and you will find so much uses of this
style (or even worse styles) that it seems to be a common paradigm.
On 7 Sep 2003 03:21:25 -0700, ll*****@web.de (Lothar Scholz) wrote: Simon Burton <si****@webone.com.au> wrote in message news:<pa****************************@webone.com.au >... hmmm... I think (some) static analysis may be possible. The main thing to exclude is eval/exec but even then, yes you're right, some programs would just have to be run to find out what they do.
Whats with code like:
if foo: def myfunc(): ... do something else: def myfunc(): ... calling your_func()
A Language where the program calling hierarchie depends on runtime calculations is not able to provide good refactoring tools or static flow analysis. This is the huge difference to a language like Smalltalk where we live in an image.
And if you say that this is a hack, then you are making a big mistake, look at currently used code and you will find so much uses of this style (or even worse styles) that it seems to be a common paradigm.
Which only begins to hint at what is possible with metaclasses ;-)
Regards,
Bengt Richter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: FISH |
last post by:
Ever have one of those days when you're not sure if it's you who's gone
mad, or the rest of the world?
I have an Open Source project on SourceForge for communication with YSMG
- Yahoo's IM...
|
by: Edward Berard |
last post by:
I am looking for tools that will analyze Java source code:
-> I am primarily looking for metrics tools, e.g., tools
that will tell me things like
- Total lines of code
- Total blank lines...
|
by: flupke |
last post by:
Hi,
i create my GUIs mainly via wxGlade. However when you start of to
program and want to do some rearranging to the gui, wxglade overwrites
your file and you've got to put your own code back...
|
by: Steven T. Hatton |
last post by:
Are there any tools (preferably available for linux) which will display the
concatanated source code representative of an entire translation unit?
Something that would simply provide a graphical...
|
by: Stuart Clark |
last post by:
Hi,
I am having quite a major problem with an access database. Basically,
under "Tools => Startup", there are options to disable the Menu's
(e.g. - file, tools etc), the toolbars, the main...
|
by: Namratha Shah \(Nasha\) |
last post by:
Hey Guys,
Today we are going to look at Code Access Security.
Code access security is a feature of .NET that manages code depending on its
trust level. If the CLS trusts the code enough to...
|
by: James J. Besemer |
last post by:
I would like to champion a proposed enhancement to Python. I describe the
basic idea below, in order to gage community interest. Right now, it's only
an idea, and I'm sure there's room for...
|
by: call_me_anything |
last post by:
Our group uses Vi editor for writing code and "grep" to understand the
working of the code.
Seems like we are living 20 years behind the current age.
I have searched for some good tools on the...
|
by: Studiotyphoon |
last post by:
Hi,
I have report which I need to print 3 times, but would like to have
the following headings
Customer Copy - Print 1
Accounts Copy - Print 2
File Copy -Print 3
I created a macro to...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |