Organizing Python Code

jay.krell at cornell.edu jay.krell at cornell.edu
Sat Oct 7 02:39:53 EDT 2000


I use Visual C++ find in files, which can search multiple directories trees
(though darnit I want checkboxes in the list rather than deleting them).
For really searching the whole tree, we use an Index Server, though it
doesn't have the flexibility of search pattern that Visual C++ has. I don't
know how to tell it case sensitive nor do I know how to make it search for
word sequences with spaces in them..

 - Jay

-----Original Message-----
From: Garth Dighton <gdighton at geocities.com>
Newsgroups: comp.lang.python
To: python-list at python.org <python-list at python.org>
Date: Friday, October 06, 2000 1:24 PM
Subject: Re: Organizing Python Code


>rwallace at esatclear.ie (Russell Wallace) wrote in
><39DD2319.6ECE412E at esatclear.ie>:
>
>>Greg Ewing wrote:
>
>>> Recently I had occasion to work on a Borland Pascal
>>> program written by someone else, consisting of a few
>>> dozen source files spread over several directories.
>>> I found myself wishing that Borland Pascal had a more
>>> explicit import mechanism than just "uses modulename".
>>
>>...I don't understand where the difficulty is?
>>
>>Pascal: grep "procedure foo" or "function foo" *.pas (unless my Pascal
>>is rustier than I think it is :))
>>C: grep foo *.h
>>Python: grep "def foo" *.py
>>
>>and equivalents for definitions of classes, global variables etc.  I
>>find this easily works even for hundreds of source files of other
>>people's code that I'm not familiar with.
>>
>
>This doesn't work when the code is in several directories. I frequently
>have this problem at work, where the source code for our main product is
>spread across several hundred files in 50 or so directories (our product is
>a database server, so the architecture is fairly complicated). You CAN'T
>just do a grep to find the function definition. (although you can usually
>grep the include directory to find the declaration, this doesn't always
>tell you where to look for the definition itself.)
>
>--
>Garth Dighton
>
>
>
>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
>-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
>--
>http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list