Getting started with the Python source

R

renguy

I am interested in making some changes and additions to the Python
environment (Python and IDLE). I have the source code and can build the
source, but what I want to know is what are the "main" functions or
source code for Python and IDLE. Specifically I would like to know what
in Python and IDLE would be analogous to void main () in a standard C
program. This will help me to work out the structure of the interpreter
and the environment. Your help will be greatly appreciated. The changes
I wish to make are for investigating the modification of the Python
environment for novice programmers.
 
D

dakman

Actually IDLE was written purley in python, you can find the sources to
it in...

UNIX: /usr/lib/python<version>/idlelib
Windows: C:\Python<version>\Lib\idlelib

If you are looking to modifly mostly just the IDE I would start there,
however if you are more interesting in modifying python Itself just
look around in the sources, it should be relativley easy to find.
 
R

renguy

Thank you for your response. I guess I was looking for a more specific
answer. I have the source and I have been looking around at the various
code. I think my question is, what is the name of the toplevel source
code file of C code for the Python interpreter, and what is the name of
the toplevel source code file for IDLE? Does that make sense?

Thanks again.
 
D

dakman

Right, I am pretty sure that the "toplevel" source of idle is in
dir-to-pylibs/idlelib/idle.py
(or maybe .pyw) that is were all the glue code is for idle, as for the
python source, I haven't messed around with it too much so I couldn'
tell you, well just have to wait for somone else to post that
information...

....
 
F

Fredrik Lundh

renguy said:
Thank you for your response. I guess I was looking for a more specific
answer. I have the source and I have been looking around at the various
code. I think my question is, what is the name of the toplevel source
code file of C code for the Python interpreter, and what is the name of
the toplevel source code file for IDLE? Does that make sense?

to learn more about the Python interpreter, see:

http://effbot.org/pyfaq/where-do-i-start-if-i-want-to-learn-about-the-cpython-implementation

</f>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top