On 08/27/2010 12:45 PM, Luie Xia wrote:
Hi All,

I would like to understand the TRAC source code. But I found it is very
difficult to understand source code structure. For instance, I could not
find the main.py code.  Does anyone can guide me how to find the main
file,

(ma...@e2-06l) ~/workspace/code/trac (master)$ find . -name main.py
./trac/web/main.py
./trac/versioncontrol/web_ui/main.py

I'd expect that trac/web/main.py is the one you seek.

and read all source codes from there?

In the main.py file, I see the following import directives related to trac:

from trac import __version__ as TRAC_VERSION
from trac.config import ExtensionOption, Option, OrderedExtensionsOption
from trac.core import *
from trac.env import open_environment
from trac.perm import PermissionCache, PermissionError, PermissionSystem
from trac.resource import ResourceNotFound
from trac.util import get_lines_from_file, get_last_traceback, hex_entropy, \
                      arity
from trac.util.compat import partial, reversed
from trac.util.datefmt import format_datetime, http_date, localtz, timezone
from trac.util.text import exception_to_unicode, shorten_line, to_unicode
from trac.util.translation import _
from trac.web.api import *
from trac.web.chrome import Chrome
from trac.web.clearsilver import HDFWrapper
from trac.web.href import Href
from trac.web.session import Session

So, for example, trac.config.py is in trac/config.py.
--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to