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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.7: http://docutils.sourceforge.net/" />
<title>Readme/Help for PyPE (Python Programmer's Editor)</title>
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
<div class="document" id="readme-help-for-pype-python-programmer-s-editor">
<h1 class="title">Readme/Help for PyPE (Python Programmer's Editor)</h1>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first"><a name="table-of-contents">Table of Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#license-and-contact-information" id="id4" name="id4">License and Contact information</a></li>
<li><a class="reference" href="#requirements" id="id5" name="id5">Requirements</a></li>
<li><a class="reference" href="#installation" id="id6" name="id6">Installation</a></li>
<li><a class="reference" href="#command-line-options" id="id7" name="id7">Command Line Options</a><ul>
<li><a class="reference" href="#last" id="id8" name="id8">--last</a></li>
<li><a class="reference" href="#unicode-and-ansi" id="id9" name="id9">--unicode and --ansi</a></li>
<li><a class="reference" href="#nothread" id="id10" name="id10">--nothread</a></li>
<li><a class="reference" href="#experimental-macros" id="id11" name="id11"><em>Experimental</em> --macros</a></li>
</ul>
</li>
<li><a class="reference" href="#help" id="id12" name="id12">Help</a><ul>
<li><a class="reference" href="#why-doesn-t-the-windows-install-work" id="id13" name="id13">Why doesn't the Windows install work?</a></li>
<li><a class="reference" href="#why-doesn-t-pype-work-on-linux" id="id14" name="id14">Why doesn't PyPE work on Linux?</a></li>
<li><a class="reference" href="#why-doesn-t-pype-work-on-osx" id="id15" name="id15">Why doesn't PyPE work on OSX?</a></li>
<li><a class="reference" href="#what-is-sloppy-cut-copy" id="id16" name="id16">What is Sloppy Cut/Copy?</a></li>
<li><a class="reference" href="#what-is-smart-paste" id="id17" name="id17">What is Smart Paste?</a></li>
<li><a class="reference" href="#dictionaries-and-alphabets-for-the-spell-checker" id="id18" name="id18">Dictionaries and alphabets for the Spell checker</a></li>
<li><a class="reference" href="#how-does-one-pype-work" id="id19" name="id19">How does "One PyPE" work?</a></li>
<li><a class="reference" href="#what-the-heck-is-a-trigger" id="id20" name="id20">What the heck is a Trigger?</a></li>
<li><a class="reference" href="#find-replace-bars" id="id21" name="id21">Find/Replace bars</a></li>
<li><a class="reference" href="#what-the-heck-is-going-on-with-string-escapes-in-regular-expressions-and-or-multiline-searches" id="id22" name="id22">What the heck is going on with string escapes in regular expressions and/or multiline searches?</a></li>
<li><a class="reference" href="#what-happens-when-smart-case-is-enabled-during-a-replace" id="id23" name="id23">What happens when "Smart Case" is enabled during a replace?</a></li>
<li><a class="reference" href="#what-is-up-with-the-enable-file-drops-checkbox-in-the-edit-menu" id="id24" name="id24">What is up with the "Enable File Drops" checkbox in the 'Edit' menu?</a></li>
<li><a class="reference" href="#how-do-i-use-the-todo-list" id="id25" name="id25">How do I use the 'Todo' list?</a></li>
<li><a class="reference" href="#what-are-the-currently-known-issues-within-pype-s-parser" id="id26" name="id26">What are the currently known issues within PyPE's parser?</a></li>
<li><a class="reference" href="#how-do-you-get-usable-calltips" id="id27" name="id27">How do you get usable Calltips?</a></li>
<li><a class="reference" href="#how-do-you-get-autocompletion" id="id28" name="id28">How do you get autocompletion?</a></li>
<li><a class="reference" href="#crlf-lf-cr-line-endings" id="id29" name="id29">CRLF/LF/CR line endings</a></li>
<li><a class="reference" href="#stcstyleeditor-py" id="id30" name="id30">STCStyleEditor.py</a></li>
<li><a class="reference" href="#expandable-collapsable-foldable-code" id="id31" name="id31">Expandable/collapsable/foldable code</a></li>
<li><a class="reference" href="#converting-between-tabs-and-spaces" id="id32" name="id32">Converting between tabs and spaces</a></li>
</ul>
</li>
<li><a class="reference" href="#faq" id="id33" name="id33">FAQ</a><ul>
<li><a class="reference" href="#what-s-the-deal-with-the-version-numbering-scheme" id="id34" name="id34">What's the deal with the version numbering scheme?</a></li>
<li><a class="reference" href="#how-did-pype-come-about" id="id35" name="id35">How did PyPE come about?</a></li>
</ul>
</li>
<li><a class="reference" href="#thank-yous" id="id36" name="id36">Thank Yous</a></li>
</ul>
</div>
<div class="section" id="license-and-contact-information">
<h1><a class="toc-backref" href="#id4" name="license-and-contact-information">License and Contact information</a></h1>
<p><a class="reference" href="http://pype.sourceforge.net">http://pype.sourceforge.net</a>
<a class="reference" href="http://come.to/josiah">http://come.to/josiah</a></p>
<p>PyPE is copyright 2003-2006 Josiah Carlson.
Contributions are copyright their respective authors.</p>
<p>This software is licensed under the GPL (GNU General Public License) as it
appears here: <a class="reference" href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>
It is also included with this archive as <a class="reference" href="gpl.txt">gpl.txt</a>.</p>
<p>The included STCStyleEditor.py, which is used to support styles, was released
under the wxWindows license and is copyright (c) 2001 - 2002 Riaan Booysen.
The copy included was also distributed with the wxPython Demos and Docs for
wxPython version 2.6 for Python 2.3, and may or may not have been modified by
the time you read this. The wxWindows license and the LGPL license it
references are included with this software as <a class="reference" href="wxwindows.txt">wxwindows.txt</a>
and <a class="reference" href="lgpl.txt">lgpl.txt</a>.</p>
<p>The included stc-styles.rc.cfg was modified from the original version in order
to not cause exceptions during style changes, as well as adding other language
style definitions, and was originally distributed with wxPython version
2.4.1.2 for Python 2.2 .</p>
<p>If you do not also receive a copy of <a class="reference" href="gpl.txt">gpl.txt</a>,
<a class="reference" href="wxwindows.txt">wxwindows.txt</a>, and <a class="reference" href="lgpl.txt">lgpl.txt</a> with your version
of this software, please inform me of the violation at either web page at the
top of this document.</p>
</div>
<div class="section" id="requirements">
<h1><a class="toc-backref" href="#id5" name="requirements">Requirements</a></h1>
<p>Either a machine running Python and wxPython, or a Windows machine that can
run the binaries should be sufficient. Initial revisions of PyPE were
developed on a PII-400 with 384 megs of ram, but it should work on any machine
that can run the most recent wxPython revisions. Some portions may be slow
(Document->Wrap Long Lines especially, which is a known issue with the
scintilla text editor control), but it should still be usable.</p>
<p>PyPE 2.x has only been tested on Python 2.3 and wxPython 2.6.3.0. It should
work on later versions of Python and wxPython. If you are having issues, file
a bug report on <a class="reference" href="http://sourceforge.net/projects/pype">http://sourceforge.net/projects/pype</a> .</p>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id6" name="installation">Installation</a></h1>
<p>If you have Python 2.3 or later as well as wxPython 2.6.1.0 or later, you can
extract PyPEX.Y.Z-src.zip anywhere and run it by double-clicking on pype.py or
pype.pyw . If you want to be all official, you can use
'python setup.py install', but that is generally unnecessary.</p>
<p>If you don't have Python 2.3 wxPython 2.6.1.0 or later, and are running
Windows, you should (hopefully) be able to run the Windows binaries. They are
provided for your convenience (so you don't have to install Python and
wxPython).</p>
<p>If it so happens that the Windows binaries don't work for you, and you have an
installation of Python and wxPython that fits the requirements, why don't you
run the source version? The only difference is a pass through py2exe, and a
minor loading time speed increase. Just because the Windows binaries exist,
doesn't mean that you /have/ to run them.</p>
</div>
<div class="section" id="command-line-options">
<h1><a class="toc-backref" href="#id7" name="command-line-options">Command Line Options</a></h1>
<div class="section" id="last">
<h2><a class="toc-backref" href="#id8" name="last">--last</a></h2>
<p>When PyPE is run with the '--last' command line option, PyPE will attempt to
load all documents that were opened the last time you shut down PyPE. This is
equivalent to starting up PyPE and using File->Open Last .</p>
</div>
<div class="section" id="unicode-and-ansi">
<h2><a class="toc-backref" href="#id9" name="unicode-and-ansi">--unicode and --ansi</a></h2>
<p>If PyPE is started up with the --unicode or --ansi command line options, it
will attempt to use the unicode or ansi versions of wxPython respectively. On
failure, it will display to the user with a failure notice. These options
have no effect on the Windows distributions of PyPE, or wherever
<tt class="docutils literal"><span class="pre">hasattr(sys,</span> <span class="pre">'frozen')</span></tt> is true.</p>
</div>
<div class="section" id="nothread">
<h2><a class="toc-backref" href="#id10" name="nothread">--nothread</a></h2>
<p>This command line option will disable the threaded parser, which may cause
problems on some platforms. This will reduce the accuracy of the tools in
the "Tools" menu, due to the faster and not necessarily correct parser.</p>
</div>
<div class="section" id="experimental-macros">
<h2><a class="toc-backref" href="#id11" name="experimental-macros"><em>Experimental</em> --macros</a></h2>
<p>PyPE 2.5 has a partially functional macro system. Anything involving regular
typing, keyboard navagation with arrows, etc., should work. Cut/Copy/Paste
should work. At this time, I offer no support for PyPE's macro functionality,
which is incomplete, and may never be complete. Due to its experimental
nature, you only get access to one macro at a time; the most recent macro.
Macro recording and playback are available in the Document menu as
"Record Macro" and "Playback Macro".</p>
</div>
</div>
<div class="section" id="help">
<h1><a class="toc-backref" href="#id12" name="help">Help</a></h1>
<div class="section" id="why-doesn-t-the-windows-install-work">
<h2><a class="toc-backref" href="#id13" name="why-doesn-t-the-windows-install-work">Why doesn't the Windows install work?</a></h2>
<p>Depending on your platform, it may or may not work. It works for me on
Windows 2k, XP and 98. Most problems people have is that they mistakenly
extract library.zip, which they shouldn't do. It could also be due to the
lack of some DLL, in which case an error message should inform you of what DLL
you are missing.</p>
</div>
<div class="section" id="why-doesn-t-pype-work-on-linux">
<h2><a class="toc-backref" href="#id14" name="why-doesn-t-pype-work-on-linux">Why doesn't PyPE work on Linux?</a></h2>
<p>PyPE 2.5 has been tested on Ubuntu 6.06 with...</p>
<ul class="simple">
<li>python-wxversion_2.6.1.2ubuntu2_all.deb</li>
<li>libwxgtk2.6-0_2.6.1.2ubuntu2_i386.deb</li>
<li>python-wxgtk2.6_2.6.1.2ubuntu2_i386.deb</li>
</ul>
<p>The only anomalies observed so far is seemingly a bug with some
wx.ScrolledPanel uses, specifically the 'Search' tab along the bottom not
displaying all of the options for searching within files. Making the bottom
set of tools larger, then using a hotkey to show/hide the tools whenever
necessary is a workable (if not ugly and inconvenient) workaround.</p>
<p>There have previously been reports of PyPE segfaulting in certain Linux
distributions when opening a file. This seems to be caused by icons in the
file listing in the 'Documents' tab on the right (or left) side of the editor
(depending on your preferences), or by icons in the notebook tabs along the
top of the editor. You can disable these icons by starting up PyPE, going to
Options->Use Icons, and making sure that it is unchecked. You should restart
PyPE to make sure that the setting sticks. PyPE will be uglier, but it should
work. I believe that this has been fixed in PyPE 2.4.1 and later, but this
documentation persists "just in case".</p>
</div>
<div class="section" id="why-doesn-t-pype-work-on-osx">
<h2><a class="toc-backref" href="#id15" name="why-doesn-t-pype-work-on-osx">Why doesn't PyPE work on OSX?</a></h2>
<p>I have had no reports of PyPE working or not working on any version of OSX. I
don't have a Mac, and I'm not too keen on running a hacked version of OSX on
X86 hardware, so unless someone is willing to donate or test, I'll continue to
have no idea of whether it runs or not.</p>
</div>
<div class="section" id="what-is-sloppy-cut-copy">
<h2><a class="toc-backref" href="#id16" name="what-is-sloppy-cut-copy">What is Sloppy Cut/Copy?</a></h2>
<p>When selecting multiple lines for a cut/copy operation, Sloppy Cut/Copy will
select the entirety of partially selected lines. This saves the user from
having to meticulously select the start and end points of multi-line
selections.</p>
</div>
<div class="section" id="what-is-smart-paste">
<h2><a class="toc-backref" href="#id17" name="what-is-smart-paste">What is Smart Paste?</a></h2>
<p>Smart Paste is two functionalities in one.</p>
<ol class="arabic simple">
<li>When pasting multiple lines into a currently indented region, it will
reindent the pasted region such that the least indented line of the pasted
region matches the current indentation level, all other indent levels being
relative to the current/minimum.</li>
<li>When the cursor is in a non-indent portion of a line, and you paste, Smart
Paste will automatically paste to the next line, automatically indenting
one level deeper as necessary if you had selected the start of a new block
(like if, for, while, def, etc., for Python, open curly braces '{' in C,
etc.).</li>
</ol>
</div>
<div class="section" id="dictionaries-and-alphabets-for-the-spell-checker">
<h2><a class="toc-backref" href="#id18" name="dictionaries-and-alphabets-for-the-spell-checker">Dictionaries and alphabets for the Spell checker</a></h2>
<p>You can create/delete custom dictionaries via the +/- buttons right next to
the "Custom Dictionaries:" section. You can add words to these custom
dictionaries by "Check"ing your document for misspellings, checking all of the
words you want to add, clicking "+ ./", then choosing the custom dictionary
you want the words added to.</p>
<p>If you want to use a large primary dictionary, create a 'dictionary.txt' file
that is utf-8 encoded, and place it into the same path that PyPE is. This
will be far faster for startup, shutdown, and creating the list than manually
adding all of the words to custom dictionaries. Fairly reasonable word lists
for english (British, Canadian, or American) are available at Kevin's Word
list page: <a class="reference" href="http://wordlist.sourceforge.net/">http://wordlist.sourceforge.net/</a> Words should be separated by any
standard whitespace character (spaces, tabs, line endings, etc.).</p>
<p>If you want to customize the alphabet that PyPE uses for suggesting spelling,
you can create an 'alphabet.txt' file that is utf-8 encoded, where alphabet
characters separated by commas ',', and place it into the same path that PyPE
is.</p>
</div>
<div class="section" id="how-does-one-pype-work">
<h2><a class="toc-backref" href="#id19" name="how-does-one-pype-work">How does "One PyPE" work?</a></h2>
<p>If "One PyPE" is selected, it will remove the file named 'nosocket' from the
path in which PyPE is running from (if it exists), and start a listening
socket on 127.0.0.1:9999 . If "One PyPE" is deselected, it will create a file
called 'nosocket' in the path from which PyPE is running, and close the
listening socket (if one was listening).</p>
<p>Any new PyPE instances which attempt to open will check for the existence of
the nosocket file. If it does not find that file, it will attempt to create a
new listening socket on 127.0.0.1:9999 . If the socket creation fails, it
will attempt to connect to 127.0.0.1:9999 and send the documents provided on
the command-line to the other PyPE instance. If it found the file, or if it
was able to create the socket, then a new instance of PyPE will be created,
and will use the preferences-defined "One PyPE" (preventing certain issues
involving a read-only path which PyPE is on, or a read-only nosocket file).</p>
<p>If you want to prevent new instances of PyPE from ever creating or using
sockets, create a file called 'nosocket' and make it read-only to PyPE.</p>
</div>
<div class="section" id="what-the-heck-is-a-trigger">
<h2><a class="toc-backref" href="#id20" name="what-the-heck-is-a-trigger">What the heck is a Trigger?</a></h2>
<p>Let us say that you writing a web page from scratch. Let us also say that
typing in everything has gotten a bit tiresome, so you want to offer yourself
a few macro-like expansions, like 'img' -> '<img src="">'.</p>
<ol class="arabic simple">
<li>Go to: Document->Set Triggers.</li>
<li>Click on 'New Trigger'.</li>
<li>In the 'enter' column of the new trigger, type in 'img' (without quotes).</li>
<li>In the 'left' column, type in '<img src="' (without single-quotes).</li>
<li>In the 'right' column, type in '">' (without single quotes).</li>
</ol>
<p>In the future, if you type in 'img' (without quotes) and use
Edit->Perform Trigger, it will expand itself to '<img src="">' (without single
quotes) with your cursor between the two double quotes.</p>
<p>What other nifty things are possible? How about automatic curly and square
brace matching with [, [, ] and {, {, }? Note that triggers with a single
character in the 'enter' column are automatically done as you type, but
triggers with multiple characters in the 'enter' column require using
Edit->Perform Trigger (or its equivalent hotkey if you have assigned one).</p>
<p>The semantics for string escapes are identical to that of standard string
escapes in Python.</p>
</div>
<div class="section" id="find-replace-bars">
<h2><a class="toc-backref" href="#id21" name="find-replace-bars">Find/Replace bars</a></h2>
<p>If you have ' or " as the first character in a find or find/replace entry, and
what you entered is a proper string declaration in Python, PyPE will use the
compiler module to parse and discover the the string. For example, to
discover LF characters, use <tt class="docutils literal"><span class="pre">"\\n"</span></tt>, including quotes.</p>
</div>
<div class="section" id="what-the-heck-is-going-on-with-string-escapes-in-regular-expressions-and-or-multiline-searches">
<h2><a class="toc-backref" href="#id22" name="what-the-heck-is-going-on-with-string-escapes-in-regular-expressions-and-or-multiline-searches">What the heck is going on with string escapes in regular expressions and/or multiline searches?</a></h2>
<p>You can use standard Python strings with escapes and quote marks just like
when you use the find/replace bars with one minor difference; all searched
data is normalized to have <tt class="docutils literal"><span class="pre">\\n</span></tt> line endings regardless of the input. This
means that if you want to find a colon followed by a line ending followed by
a space, you would use <tt class="docutils literal"><span class="pre">":\\n</span> <span class="pre">"</span></tt>, including quotes.</p>
<p>If you include line endings in your search string, then multiline searching
will be automatically enabled during the search (but the box will remain
checked or unchecked).</p>
</div>
<div class="section" id="what-happens-when-smart-case-is-enabled-during-a-replace">
<h2><a class="toc-backref" href="#id23" name="what-happens-when-smart-case-is-enabled-during-a-replace">What happens when "Smart Case" is enabled during a replace?</a></h2>
<p>If the found string is all upper or lower case, it will be replaced by a
string that is also all upper or lower case.</p>
<p>Else if the length of the found string is the same length as the replacement
string, you can replace one string for another, preserving capitalization.</p>
<p>For example...</p>
<pre class="literal-block">
def handleFoo(foo, arg2):
tfOO = fcn(foo)
tFOO2 = fcn2(tfOO)
return fcn3(tfOO, tFOO2, foo)
</pre>
<p>...becomes...</p>
<pre class="literal-block">
def handleGoo(goo, arg2):
tgOO = fcn(goo)
tGOO2 = fcn2(tgOO)
return fcn3(tgOO, tGOO2, goo)
</pre>
<p>...by enabling "Smart Case", and putting 'foo' and 'goo' in the find/replace
boxes.</p>
<p>Otherwise if the first letter of the found string is upper or lowercase, then
its replacement will have the first letter be upper or lowercase respectively.</p>
</div>
<div class="section" id="what-is-up-with-the-enable-file-drops-checkbox-in-the-edit-menu">
<h2><a class="toc-backref" href="#id24" name="what-is-up-with-the-enable-file-drops-checkbox-in-the-edit-menu">What is up with the "Enable File Drops" checkbox in the 'Edit' menu?</a></h2>
<ol class="arabic simple">
<li>Select some text.</li>
<li>Now click on it.</li>
</ol>
<p>Q: Do you want the selection to go away, and your cursor to be close to where
you clicked?</p>
<p>A1: If yes, uncheck the box and restart if necessary.</p>
<p>A2: If no, check the box and restart if necessary.</p>
<p>(The check is effective for any opened document from then on, but does not
change the behavior of already opened documents.)</p>
<p>One should always be able to drag and drop text. One should always be able to
drag and drop files everywhere, except for the text editor portion. If
checked, you can drop files on the editor portion, if unchecked, you won't be
able to drop files on the text editor portion.</p>
</div>
<div class="section" id="how-do-i-use-the-todo-list">
<h2><a class="toc-backref" href="#id25" name="how-do-i-use-the-todo-list">How do I use the 'Todo' list?</a></h2>
<p>On a line by itself (any amount of leading spaces), place something that
matches the following regular expression: <tt class="docutils literal"><span class="pre">#([a-zA-Z0-9</span> <span class="pre">]+):(.*)</span></tt></p>
<p>The first group (after a .strip().lower() translation) will become category in
the 'Category' column, the second group (after a .strip()) becomes the todo in
the 'Todo' column, and the number of exclamation points will become the number
in the '!' column.</p>
<p>Well, it is a bit smarter, it tosses all entries with a 'Category' that is
also a keyword (keyword.kwlist), or one of the following: http, ftp, mailto,
news, gopher, and telnet.</p>
<p>The following lines are all valid todos</p>
<pre class="literal-block">
# todo: fix the code below
#todo:fix the code below!
# TODo: fix the code below
#bug:I am a big ugly bug...no, I really am, but I'm also a todo
# this thing can even have spaces: but it cannot have punctuation!
#I am not a valid todo...: because there is punctuation on the left
</pre>
</div>
<div class="section" id="what-are-the-currently-known-issues-within-pype-s-parser">
<h2><a class="toc-backref" href="#id26" name="what-are-the-currently-known-issues-within-pype-s-parser">What are the currently known issues within PyPE's parser?</a></h2>
<p>If given a syntactically correct Python source file, the Python parser should
work without issue (as long as --nothread is not provided), though it may not
be fast (where fast is < .1 seconds).</p>
<p>If not given a syntactically correct Python source file (or if --nothread was
provided as a command line option), the parser splits the file into lines,
doing a check to see if there is a function, class, or comment on that line,
then saves the hierarchy information based on the level of indentation and
what came before it. This can be inaccurate, as it will mistakenly believe
that the below function 'enumerate' is a method of MyException.</p>
<pre class="literal-block">
class MyException(exceptions.Exception):
pass
try:
enumerate
except:
def enumerate(inp):
return zip(range(len(inp)), inp)
</pre>
<p>It also doesn't know anything about multi-line strings, so the definition nada
in the following line would be seen as a function, and not part of a string.</p>
<pre class="literal-block">
old = 'this used to be a function\
def nada(inp):\
return None'
</pre>
<p>Ah well, one has to give up something for speed. Another thing given up is
that the parser will not pull out doc strings or handle multi-line function
definitions properly.</p>
<p>I don't have a real parser for the C, so it only really extracts //todo:
items. I also don't have a real parser for TeX, so it only extracts
*section{} and label definitions, along with %todo: items.</p>
</div>
<div class="section" id="how-do-you-get-usable-calltips">
<h2><a class="toc-backref" href="#id27" name="how-do-you-get-usable-calltips">How do you get usable Calltips?</a></h2>
<p>Hit F5. This will also rebuild the browsable source tree, autocomplete
listing, and todo list.</p>
</div>
<div class="section" id="how-do-you-get-autocompletion">
<h2><a class="toc-backref" href="#id28" name="how-do-you-get-autocompletion">How do you get autocompletion?</a></h2>
<p>Easy. In the 'Document' menu, there is an entry for 'Show autocomplete'.
Make sure there is a check by it, and you are set. If you want to get a new
or updated listing of functions, hit the F5 key on your keyboard.</p>
</div>
<div class="section" id="crlf-lf-cr-line-endings">
<h2><a class="toc-backref" href="#id29" name="crlf-lf-cr-line-endings">CRLF/LF/CR line endings</a></h2>
<p>PyPE will attempt to figure out what kind of file was opened, it does this by
counting the number of different kinds of line endings. Which ever line
ending appears the most in an open file will set the line ending support for
viewing and editing in the window. Also, any new lines will have that line
ending. New files will have the same line endings as the host operating
system.</p>
<p>Additionally, copying from an open document will not change the line-endings.
Future versions of PyPE may support the automatic translation of text during
copying and pasting to/from the host operating system's native line endings.</p>
<p>Converting between line endings is a menu item that is available in the
'Document' menu.</p>
</div>
<div class="section" id="stcstyleeditor-py">
<h2><a class="toc-backref" href="#id30" name="stcstyleeditor-py">STCStyleEditor.py</a></h2>
<p>As I didn't write this, I can offer basically no support for it. It seems to
work to edit python colorings, and if you edit some of the last 30 or so lines
of it, you can actually use the editor to edit some of the other styles that
are included.</p>
<p>If it doesn't work for you, I suggest you revert to the copy of the editor and
stc-styles.rc.cfg that is included with the distribution of PyPE you received.
As it is a known-good version, use it.</p>
</div>
<div class="section" id="expandable-collapsable-foldable-code">
<h2><a class="toc-backref" href="#id31" name="expandable-collapsable-foldable-code">Expandable/collapsable/foldable code</a></h2>
<p>Since the beginning, there have been expandable and collapsable scopes thanks
to wxStyledTextCtrl. How to use them...
Given the below...</p>
<pre class="literal-block">
- class nada:
- def funct(self):
- if 1:
| #do something
| pass
</pre>
<p>Shift-clicking the '-' next to the class does this...</p>
<pre class="literal-block">
- class nada:
+ def funct(self):
</pre>
<p>Or really, it's like ctrl-clicking on each of the functions declared in the
scope of the definition. Shift-clicking on the '-' a second time does
nothing. Shift-clicking on a '+' expands that item completely.</p>
<p>Control-clicking on a '+' or '-' collapses or expands the entirety of the
scopes contained within.</p>
<p>I don't know about you, but I'm a BIG fan of shift-clicking classes. Yeah.
Play around with them, you may like it.</p>
</div>
<div class="section" id="converting-between-tabs-and-spaces">
<h2><a class="toc-backref" href="#id32" name="converting-between-tabs-and-spaces">Converting between tabs and spaces</a></h2>
<p>So, you got tabs and you want spaces, or you have spaces and want to make them
tabs. As it is not a menu option, you're probably wondering "how in the hell
am I going to do this". Well, if you read the above stuff about string
escapes in the find/replace bar, it would be trivial.
Both should INCLUDE the quotation marks.
To convert from tabs to 8 spaces per tab; replace <tt class="docutils literal"><span class="pre">"\\t"</span></tt> with <tt class="docutils literal"><span class="pre">"</span> <span class="pre">"</span></tt>
To convert from 8 spaces to one tab; replace <tt class="docutils literal"><span class="pre">"</span> <span class="pre">"</span></tt> with <tt class="docutils literal"><span class="pre">"\\t"</span></tt></p>
</div>
</div>
<div class="section" id="faq">
<h1><a class="toc-backref" href="#id33" name="faq">FAQ</a></h1>
<div class="section" id="what-s-the-deal-with-the-version-numbering-scheme">
<h2><a class="toc-backref" href="#id34" name="what-s-the-deal-with-the-version-numbering-scheme">What's the deal with the version numbering scheme?</a></h2>
<p>Early in development, PyPE raised version numbers very quickly. From 1.0 to
1.5, not much more than 2 months passed. In that time, most of the major
initial architectural changes that were to happen, happened. This is not the
reason for the version number change. Really it was so that the MAJOR
versions could have their own point release (1.0 being the first), and minor
bugfixes on the point releases would get a minor release number (like 1.0.1).</p>
<p>Then, at around PyPE 1.4.2, I had this spiffy idea. What if I were to release
a series of PyPE versions with the same version numbers as classic Doom? I
remembered updating to 1.1, then to 1.2a, etc. My favorite was 1.666. Ah
hah! PyPE 1.6.6.6, the best version of PyPE ever.</p>
<p>I decided that I would slow version number advancement, if only so that people
didn't get sick of new releases of PyPE being numbered so much higher when
there were minimal actual changes. Then the more I thought about it, the more
I realized that it doesn't matter at all, I mean, Emacs is on version 20+.
*shrug*</p>
<p>When PyPE 1.9.3 came out, I had a few other ideas for what I wanted to happen,
but since major changes to the underlying architecture were required, it
really should get a major number bump to 2.0. After spending 3 months not
working on PyPE May-July 2004, I got some time to muck around with it here and
there. After another few months of trying to rebuild it to only require a
single STC (with multiple document pointers, etc.) I realized that I'd have to
rebuild too much of PyPE to be able to get 2.0 out the door by 2010. So I
started modifying 1.9.3. All in all, around 85% of what I wanted made it into
PyPE 2.0, the rest was either architectural (ick), or questionable as to
whether or not anyone would even want to use the feature (even me).</p>
</div>
<div class="section" id="how-did-pype-come-about">
<h2><a class="toc-backref" href="#id35" name="how-did-pype-come-about">How did PyPE come about?</a></h2>
<p>The beginnings of PyPE were written from 10:30PM on the 2nd of July through
10:30PM on the 3rd of July, 2003. Additional features were put together on
the 4th of July along with some bug fixing and more testing for version 1.0.
Truthfully, I've been using it to edit itself since the morning of the 3rd of
July, and believe it is pretty much feature-complete (in terms of standard
Python source editing). There are a few more things I think it would be nice
to have, and they will be added in good time (if I have it).</p>
<p>One thing you should never expect is for PyPE to become an IDE. Don't expect
a UML diagram. Don't expect a debugger. Don't expect debugging support
(what, print statements not good enough for you?)</p>
<p>On the most part, this piece of software should work exactly the way you
expect it to...or at least the way I expect it to. That is the way I wrote
it. As a result, you don't get much help in using it (mostly because I am
lazy). There was a discussion of a PyPE wiki a long time ago, but that will
likely never happen (I've lost contact with the people who initially put
forward the wiki idea, and I have no interest in starting or maintaining one).</p>
<p>The majority of the things that this editor can do are in the menus. Hotkeys
for things that have them are listed next to their menu items, and you can
both rename menu items and change their hotkeys via Options->Change Menus and
Hotkeys.</p>
</div>
</div>
<div class="section" id="thank-yous">
<h1><a class="toc-backref" href="#id36" name="thank-yous">Thank Yous</a></h1>
<p>Certainly there are some people I should thank, because without them, the
piece of software you are using right now, just wouldn't be possible.</p>
<p>Guido van Rossum - without Guido, not only would I not have Python, I also
wouldn't have had some of the great inspiration that IDLE has offered. IDLE
is a wonderful editor, has some excellent ideas in terms of functionality, but
it unfortunately does not offer the extended functionality I want, and it
hurts my brain to use tk, so I cannot add it myself. Guido, my hat goes off
to you.</p>
<p>The people writing wxWidgets (previously named wxWindows) and wxPython -
without you, this also would not have been possible. You have made the most
self-consistent GUI libraries that I have ever used, made them easy to use,
and offer them on every platform that I would ever want or need. You rock.</p>
<p>Neil Hodgson and others who work on Scintilla. As wx.StyledTextCtrl is a
binding for scintilla in wxWidgets, which then has bindings for wxPython,
basically ALL the REAL functionality of the editor you are now using is the
result of Scintilla. The additional things like tabbed editing, hotkeys,
etc., they are mere surface decorations in comparison to what it would take to
write everything required for a text editor from scratch. Gah, an editor
widget that just works? Who would have figured?</p>
<p>To everyone who I have already thanked: thank you for making PyPE an almost
trivial task. It would have been impossible to go so far so fast by hand in
any other language using any other GUI toolkit or bindings.</p>
<p>And my wife - because without her, I would likely be a pathetic shell of a
man...or at least single, bored, and uncouth. Well, I'm probably still
uncouth, but there's only so much a good woman can fix.</p>
</div>
</div>
<hr class="docutils footer" />
<div class="footer">
Generated on: 2006-07-01 00:23 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
</body>
</html>
|