-
Notifications
You must be signed in to change notification settings - Fork 29
/
README.pypi
216 lines (166 loc) · 9.03 KB
/
README.pypi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
========
PyCscope
========
:Copyright: Copyright 2019 Peter Portante. See LICENSE for details.
:Author: Peter Portante
:Release: 1.2.3
:Date: 2019/10/17
Purpose
-------
A python script to generate a cscope index from a Python source
tree. `pycscope` uses Python's own parser and (C)oncrete (S)yntax
(T)ree to generate the index, so it is a bit more accurate than
plain cscope.
Usage
-----
::
pycscope.py [-D] [-R] [-S] [-V] [-f reffile] [-e path1[,path2,...]] [-i srclistfile] [files ...]
-D Dump the (C)oncrete (S)yntax (T)ree generated by the parser for each file
-R Recurse directories for files
-S Interpret simple strings as symbols
-V Print version and exit
-f reffile Use 'reffile' as cross-ref file name instead of 'cscope.out'
-i srclistfile Use the contents of 'srclistfile' as the list of source files to scan
-e path1,path2.. Exclude the list of paths from being parse
Example
-------
Rough example using `vim` as your cscope client:
::
pycscope -R .
# now you have a cscope.out. use it like you would cscope
vim hello.py
:cscope add cscope.out
:cscope find s sys
License
-------
Copyright 2019 Peter Portante
This program is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU General
Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA
Install
-------
PyCscope uses Python's distutils package for installation.
Use the following command to install this package::
% python setup.py install
Features
--------
PyCscope has the following features:
- Supports both Python 2.7 and Python 3
- Command line interface
- Output can be used by the `CscopeFinder` plugin for jEdit
- Marks for all files ending in `.py`
- Marks for all `class` definitions
- Marks for all defined functions
- Marks for function calls (algorithm is not perfect)
- Marks for end-of-function (no search uses this mark yet)
- Marks for imported modules (use the search for #include)
- Marks for symbol assignment
A *mark* is an indicator to the cscope utility that something
of interest follows.
History
-------
pycscope 0.3a and later are written and copyright Peter Portante.
pycscope 0.1 - 0.3 were originally written and copyright Dean Hall.
Status
------
It works well enough to generate an index file that can be used
by the `CscopeFinder` plugin for jEdit, emacs cscope support, or
vim's cscope handling. Other editors are not tested.
Release Notes
-------------
This is PyCscope release 1.2.3
========== ========= ====== ====================================================
Date Release Trac Changes
========== ========= ====== ====================================================
2019/10/17 1.2.3 N/A Add support for --exclude behavior, PR #25
2019/10/17 1.2.2 N/A Address README issues, adding usage example (fixes
issue #32.
---------- --------- ------ ----------------------------------------------------
2013/03/16 1.2.1 N/A Fix strings-as-symbols support (really).
---------- --------- ------ ----------------------------------------------------
2013/03/16 1.2 N/A Fix strings-as-symbols support; fix end of function
marking; add the ability to only run the indexer;
remove the threading support that was broken.
---------- --------- ------ ----------------------------------------------------
2012/10/01 1.1 N/A Fix Python3 support; enhance unit tests to run using
nose, generating coverage by default; fix broken
unit tests that were not properly run before the
switch to nose; add contrib area containing the
pyxcscope integration for (X)Emacs.
---------- --------- ------ ----------------------------------------------------
2012/09/20 1.0 N/A Call it 1.0; update to use setuptools; drop .py from
installed script name; transition authorship from
Dean Hall to Peter Portante.
---------- --------- ------ ----------------------------------------------------
2012/09/19 0.3e-pajp N/A Fix issues #7 and #8: we now properly handle symbols
closest to the assignment itself (rather than the
first one), and replace the crazy comma counting
method with a more stable pattern recognition method
that explicitly records which tuples should receive
the assignment mark; fixed handling of import state-
ments of the form, "from . import moda"
---------- --------- ------ ----------------------------------------------------
2012/09/18 0.3d-pajp N/A Implement debugging help from Issue #9: dumpCst now
works on subtrees of tuples, not just lists.
---------- --------- ------ ----------------------------------------------------
2012/09/17 0.3c-pajp N/A First pass fix of Issue #6 removing errant assertion
thus allowing symbol assignment marking to work as
coded (if not correctly, see Issue #7).
---------- --------- ------ ----------------------------------------------------
2012/09/11 0.3b-pajp N/A Include changes from fspeech to get it working for
Python 3; add proper support for yield expression
following an augmented assignment; added support
for filename and line numbers when assertions fire;
fixed handling of commas on the left hand side of
assignment statements; gracefully handle errors
opening files.
GitHub issues: #5
---------- --------- ------ ----------------------------------------------------
2012/04/29 0.3a-pajp N/A (NOTE: Failed to update version!)
Fix handling of DOS style line endings.
GitHub issues: #4
---------- --------- ------ ----------------------------------------------------
2012/04/13 0.3a-pajp N/A (NOTE: Failed to update version!)
Fix handling of function definition decorators
GitHub issues: #2, #3
---------- --------- ------ ----------------------------------------------------
2012/03/11 0.3a-pajp N/A (NOTE: Failed to update version!)
Change references from abstract syntax tree to
concrete syntax tree; fix handling of trailing
commas.
---------- --------- ------ ----------------------------------------------------
2012/03/05 0.3a-pajp N/A Updated changes to support symbol assignment,
enhance unit test coverage, prepare code for PyCon
poster session.
---------- --------- ------ ----------------------------------------------------
2007/12/25 0.3 N/A Included changes submitted by K. Rader of Google:
- Added the `-i` argument to specify a file-list
file
- Fixups to the header and footer to make a valid
file that cscope can read
---------- --------- ------ ----------------------------------------------------
2006/08/12 0.2 #33 Create 0.2 release.
#34 Change all "pyscope" to "pycscope"
#29 Make error reports less vague.
#23 Create distutils files.
#20 Create unit tests.
---------- --------- ------ ----------------------------------------------------
2006/08/02 0.1 None Released to interested party by
email.
#19 Observe newlines even without
NEWLINE token.
#18 Newlines before MARK_FILE causes
exception.
#16 Work on "." default directory.
#10 Exception: TypeError in format.
#8 Class mark is incorrect.
#6 Create project space.
========== ========= ====== ====================================================