List of functions called in Python source files?

William Dandreta wjdandreta at worldnet.att.net
Thu Jun 15 22:29:33 EDT 2000


Hi Emile,

I don't understand your answer. What does 'extracting all imports' mean?

May be if I explain what I am trying to do you can be more explicit.

I am attempting to compile Python 1.5.2 to run under DOS without a DOS
extender.

I took the WAT_DOS make file that came with the 1.5.2 distribution and
extracted the names of the 82 source files that it contained and entered
them into a project in Borland's BC4.5 C/C++ compiler.

After some problems were resoIved, I was able to get them to compile and
link but the exe was too large to load (>640K as expected).

Step 2 is to attempt to use Overlays to get 1.5.2 to run under DOS. To get
that to work, I need to know the dependency of the source files on each
other. So far I have got a list of the functions defined in each source file
along with the code size and data size each sources file uses (I extracted
this info from Borland's Tlink .map file using a Python program.)

To complete the Overlay strategy, I need a list of all the files used in
each source file. If I had that list I could check it against my functions
defined list.

I was thinking about writing a Python program to search through each source
file and pick out the functions called. I know it's possible to do that
because the C compiler has to do it but I don't have a clue how to start.

Any suggestions would be appreciated.

Bill
Emile van Sebille wrote in message
<008f01bfd724$5d5e0320$1906a8c0 at fc.fenx.com>...
>You're not going to find anything that will
>give you a definitive answer.  If you don't
>use dynamic importing, eval's or exec's in
>your source base, you may be able to get
>something useful by extracting all imports,
>and looking at the functions that may be
>used, or at least get a list of the modules
>accessed.
>
>Or-not-ly y'rs
>
>Emile van Sebille
>emile at fenx.com
>-------------------
>
>
>----- Original Message -----
>From: William Dandreta <wjdandreta at worldnet.att.net>
>Newsgroups: comp.lang.python
>To: <python-list at python.org>
>Sent: Thursday, June 15, 2000 3:39 PM
>Subject: List of functions called in Python source files?
>
>
>> I need to get a list of the external (ones not in the same
>source file)
>> functions called in each Python source file. Does anyone
>know an easy way to
>> do this?
>>
>> Bill
>>
>>
>> --
>> http://www.python.org/mailman/listinfo/python-list
>>
>
>





More information about the Python-list mailing list