~a-roehler/python-mode/XEmacs-compat-test

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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
Python-Mode commands
====================

py-load-pymacs
--------------
Load Pymacs as delivered with python-mode.el.

Pymacs has been written by François Pinard and many others.
See original source: http://pymacs.progiciels-bpi.ca

py-insert-default-shebang
-------------------------
Insert in buffer shebang of installed default Python. 

py-electric-comment
-------------------
Insert a comment. If starting a comment, indent accordingly.

If a numeric argument ARG is provided, that many colons are inserted
non-electrically.
With C-u "#" electric behavior is inhibited inside a string or comment.

py-electric-colon
-----------------
Insert a colon and indent accordingly.

If a numeric argument ARG is provided, that many colons are inserted
non-electrically.

Electric behavior is inhibited inside a string or
comment or by universal prefix C-u.
Default is nil, controlled by `py-electric-colon-active-p'

py-electric-backspace
---------------------
Delete preceding character or level of indentation.

With ARG do that ARG times.
Returns column reached. 

py-electric-delete
------------------
Delete following character or levels of whitespace.

With ARG do that ARG times. 

py-indent-line-outmost
----------------------
Indent the current line to the outmost reasonable indent.

With optional C-u an indent with length `py-indent-offset' is inserted unconditionally 

py-indent-line
--------------
Indent the current line according to Python rules.

When called interactivly with C-u, ignore dedenting rules for block closing statements
(e.g. return, raise, break, continue, pass)

This function is normally used by `indent-line-function' resp.
TAB.
Returns current indentation 

py-newline-and-indent
---------------------
Add a newline and indent to outmost reasonable indent.
When indent is set back manually, this is honoured in following lines. 

py-newline-and-dedent
---------------------
Add a newline and indent to one level below current.
Returns column. 

py-guess-indent-offset
----------------------
Guess a value for, and change, `py-indent-offset'.

By default, make a buffer-local copy of `py-indent-offset' with the
new value.
With optional argument GLOBAL change the global value of `py-indent-offset'. 

py-narrow-to-defun
------------------
Make text outside current defun invisible.

The defun visible is the one that contains point or follows point.
Optional CLASS is passed directly to `py-beginning-of-def-or-class'.

py-shift-left
-------------
Dedent region according to `py-indent-offset' by COUNT times.

If no region is active, current line is dedented.
Returns indentation reached. 

py-shift-right
--------------
Indent region according to `py-indent-offset' by COUNT times.

If no region is active, current line is indented.
Returns indentation reached. 

py-shift-paragraph-right
------------------------
Indent paragraph by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-block-right
--------------------
Indent block by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-block-left
-------------------
Dedent block by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-clause-right
---------------------
Indent clause by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-clause-left
--------------------
Dedent clause by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-def-right
------------------
Indent def by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-def-left
-----------------
Dedent def by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-class-right
--------------------
Indent class by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-class-left
-------------------
Dedent class by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-line-right
-------------------
Indent line by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-line-left
------------------
Dedent line by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-statement-right
------------------------
Indent statement by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-shift-statement-left
-----------------------
Dedent statement by COUNT spaces.

COUNT defaults to `py-indent-offset',
use [universal-argument] to specify a different value.

Returns outmost indentation reached. 

py-indent-region
----------------
Reindent a region of Python code.

The lines from the line containing the start of the current region up
to (but not including) the line containing the end of the region are
reindented.  If the first line of the region has a non-whitespace
character in the first column, the first line is left alone and the
rest of the region is reindented with respect to it.  Else the entire
region is reindented with respect to the (closest code or indenting
comment) statement immediately preceding the region.

This is useful when code blocks are moved or yanked, when enclosing
control structures are introduced or removed, or to reformat code
using a new value for the indentation offset.

If a numeric prefix argument is given, it will be used as the value of
the indentation offset.  Else the value of `py-indent-offset' will be
used.

Warning: The region must be consistently indented before this function
is called!  This function does not compute proper indentation from
scratch (that's impossible in Python), it merely adjusts the existing
indentation to be correct in context.

Warning: This function really has no idea what to do with
non-indenting comment lines, and shifts them as if they were indenting
comment lines.  Fixing this appears to require telepathy.

Special cases: whitespace is deleted from blank lines; continuation
lines are shifted by the same amount their initial line was shifted,
in order to preserve their relative indentation with respect to their
initial line; and comment lines beginning in column 1 are ignored.

py-beginning-of-paragraph-position
----------------------------------
Returns beginning of paragraph position. 

py-beginning-of-block-position
------------------------------
Returns beginning of block position. 

py-beginning-of-clause-position
-------------------------------
Returns beginning of clause position. 

py-beginning-of-def-position
----------------------------
Returns beginning of def position. 

py-beginning-of-class-position
------------------------------
Returns beginning of class position. 

py-beginning-of-line-position
-----------------------------
Returns beginning of line position. 

py-beginning-of-statement-position
----------------------------------
Returns beginning of statement position. 

py-end-of-paragraph-position
----------------------------
Returns end of paragraph position. 

py-end-of-block-position
------------------------
Returns end of block position. 

py-end-of-clause-position
-------------------------
Returns end of clause position. 

py-end-of-def-position
----------------------
Returns end of def position. 

py-end-of-class-position
------------------------
Returns end of class position. 

py-end-of-line-position
-----------------------
Returns end of line position. 

py-end-of-statement-position
----------------------------
Returns end of statement position. 

py-bounds-of-declarations
-------------------------
Bounds of consecutive multitude of assigments resp. statements around point.

Indented same level, which don't open blocks.
Typically declarations resp. initialisations of variables following
a class or function definition.
See also py-bounds-of-statements 

py-beginning-of-declarations
----------------------------
Got to the beginning of assigments resp. statements in current level which don't open blocks.


py-end-of-declarations
----------------------
Got to the end of assigments resp. statements in current level which don't open blocks. 

py-declarations
---------------
Copy and mark assigments resp. statements in current level which don't open blocks or start with a keyword.

See also `py-statements', which is more general, taking also simple statements starting with a keyword. 

py-kill-declarations
--------------------
Delete variables declared in current level.

Store deleted variables in kill-ring 

py-bounds-of-statements
-----------------------
Bounds of consecutive multitude of statements around point.

Indented same level, which don't open blocks. 

py-beginning-of-statements
--------------------------
Got to the beginning of statements in current level which don't open blocks. 

py-end-of-statements
--------------------
Got to the end of statements in current level which don't open blocks. 

py-statements
-------------
Copy and mark simple statements in current level which don't open blocks.

More general than py-declarations, which would stop at keywords like a print-statement. 

py-kill-statements
------------------
Delete statements declared in current level.

Store deleted statements in kill-ring 

py-comment-region
-----------------
Like `comment-region' but uses double hash (`#') comment starter.

py-fill-paragraph
-----------------
Like M-q, but handle Python comments and strings.

If any of the current line is a comment, fill the comment or the
paragraph of it that point is in, preserving the comment's indentation
and initial `#'s.
If point is inside a string, narrow to that string and fill.


py-insert-super
---------------
Insert a function "super()" from current environment.

As example given in Python v3.1 documentation » The Python Standard Library »

class C(B):
    def method(self, arg):
        super().method(arg) # This does the same thing as:
                               # super(C, self).method(arg)

py-nesting-level
----------------
Accepts the output of `parse-partial-sexp'. 

py-compute-indentation
----------------------
Compute Python indentation.

When HONOR-BLOCK-CLOSE-P is non-nil, statements such as `return',
`raise', `break', `continue', and `pass' force one level of dedenting.

py-continuation-offset
----------------------
With numeric ARG different from 1 py-continuation-offset is set to that value; returns py-continuation-offset. 

py-indentation-of-statement
---------------------------
Returns the indenation of the statement at point. 

py-list-beginning-position
--------------------------
Return lists beginning position, nil if not inside.

Optional ARG indicates a start-position for `parse-partial-sexp'.

py-end-of-list-position
-----------------------
Return end position, nil if not inside.

Optional ARG indicates a start-position for `parse-partial-sexp'.

py-preceding-line-backslashed-p
-------------------------------
Return t if preceding line is a backslashed continuation line. 

py-current-line-backslashed-p
-----------------------------
Return t if current line is a backslashed continuation line. 

py-escaped
----------
Return t if char is preceded by an odd number of backslashes. 

py-in-triplequoted-string-p
---------------------------
Returns character address of start tqs-string, nil if not inside. 

py-in-string-p
--------------
Returns character address of start of string, nil if not inside. 

py-in-statement-p
-----------------
Returns list of beginning and end-position if inside.

Result is useful for booleans too: (when (py-in-statement-p)...)
will work.


py-beginning-of-expression-p
----------------------------
Returns position, if cursor is at the beginning of a expression, nil otherwise. 

py-beginning-of-partial-expression-p
------------------------------------
Returns position, if cursor is at the beginning of a expression, nil otherwise. 

py-beginning-of-statement-p
---------------------------
Returns position, if cursor is at the beginning of a statement, nil otherwise. 

py-statement-opens-block-p
--------------------------
Return position if the current statement opens a block
in stricter or wider sense.

For stricter sense specify regexp. 

py-statement-opens-clause-p
---------------------------
Return position if the current statement opens block or clause. 

py-statement-opens-block-or-clause-p
------------------------------------
Return position if the current statement opens block or clause. 

py-statement-opens-class-p
--------------------------
Return `t' if the statement opens a functions or class definition, nil otherwise. 

py-statement-opens-def-p
------------------------
Return `t' if the statement opens a functions or class definition, nil otherwise. 

py-statement-opens-def-or-class-p
---------------------------------
Return `t' if the statement opens a functions or class definition, nil otherwise. 

py-current-defun
----------------
Go to the outermost method or class definition in current scope.

Python value for `add-log-current-defun-function'.
This tells add-log.el how to find the current function/method/variable.
Returns name of class or methods definition, if found, nil otherwise.

See customizable variables `py-current-defun-show' and `py-current-defun-delay'.

py-sort-imports
---------------
Sort multiline imports.

Put point inside the parentheses of a multiline import and hit
M-x py-sort-imports to sort the imports lexicographically

empty-line-p
------------
Returns t if cursor is at an line with nothing but whitespace-characters, nil otherwise.

py-count-lines
--------------
Count lines in buffer, optional without given boundaries.
Ignores common region.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7115

py-which-function
-----------------
Return the name of the function or class, if curser is in, return nil otherwise. 

py-beginning-of-block
---------------------
Looks up for nearest opening block, i.e. compound statement

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-beginning-of-if-block
------------------------
Looks up for nearest opening if-block, i.e. compound statement

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-beginning-of-try-block
-------------------------
Looks up for nearest opening try-block, i.e. compound statement.

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-end-of-block
---------------
Go to the end of a compound statement.

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-beginning-of-block-or-clause
-------------------------------
Looks up for nearest opening clause or block.

With universal argument looks for next compound statements
i.e. blocks only.

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-end-of-block-or-clause
-------------------------
Without arg, go to the end of a compound statement.

With arg , move point to end of clause at point.
Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-beginning-of-class
---------------------
Move point to start of next `class'.

See also `py-beginning-of-def-or-class'.
Returns position reached, if any, nil otherwise.

py-end-of-class
---------------
Move point beyond next method definition.

Returns position reached, if any, nil otherwise.

py-beginning-of-clause
----------------------
Looks up for nearest opening clause, i.e. a compound statements
subform.

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-end-of-clause
----------------
Without arg, go to the end of a compound statement.

With arg , move point to end of clause at point.

Returns position reached, if any, nil otherwise.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html

py-beginning-of-def
-------------------
Move point to start of `def'.

Returns position reached, if any, nil otherwise 

py-end-of-def
-------------
Move point beyond next method definition.

Returns position reached, if any, nil otherwise.

py-beginning-of-def-or-class
----------------------------
Move point to start of `def' or `class', whatever is next.

With optional universal arg CLASS, move to the beginn of class definition.
Returns position reached, if any, nil otherwise 

py-end-of-def-or-class
----------------------
Move point beyond next `def' or `class' definition.

With optional universal arg, move to the end of class exclusively.
Returns position reached, if any, nil otherwise.

py-beginning-of-expression
--------------------------
Go to the beginning of a compound python expression.

A a compound python expression might be concatenated by "." operator, thus composed by minor python expressions.

Expression here is conceived as the syntactical component of a statement in Python. See http://docs.python.org/reference
Operators however are left aside resp. limit py-expression designed for edit-purposes.


py-end-of-expression
--------------------
Go to the end of a compound python expression.

A a compound python expression might be concatenated by "." operator, thus composed by minor python expressions.

Expression here is conceived as the syntactical component of a statement in Python. See http://docs.python.org/reference

Operators however are left aside resp. limit py-expression designed for edit-purposes. 

py-beginning-of-partial-expression
----------------------------------
Go to the beginning of a minor python expression.

"." operators delimit a minor expression on their level.
Expression here is conceived as the syntactical component of a statement in Python. See http://docs.python.org/reference
Operators however are left aside resp. limit py-expression designed for edit-purposes. 

py-end-of-partial-expression
----------------------------
Go to the end of a minor python expression.

"." operators delimit a minor expression on their level.
Expression here is conceived as the syntactical component of a statement in Python. See http://docs.python.org/reference
Operators however are left aside resp. limit py-expression designed for edit-purposes. 

py-beginning-of-statement
-------------------------
Go to the initial line of a simple statement.

For beginning of compound statement use py-beginning-of-block.
For beginning of clause py-beginning-of-clause.

Referring python program structures see for example:
http://docs.python.org/reference/compound_stmts.html


py-end-of-statement
-------------------
Go to the point just beyond the final line of the current statement. 

py-goto-statement-below
-----------------------
Goto beginning of next statement. 

py-mark-expression
------------------
Mark expression at point.

Returns beginning and end positions of marked area, a cons. 

py-mark-partial-expression
--------------------------
Mark partial-expression at point.

Returns beginning and end positions of marked area, a cons.
"." operators delimit a partial-expression expression on it's level, that's the difference to compound expressions. 

py-mark-statement
-----------------
Mark statement at point.

Returns beginning and end positions of marked area, a cons. 

py-mark-block
-------------
Mark block at point.

Returns beginning and end positions of marked area, a cons. 

py-mark-block-or-clause
-----------------------
Mark block-or-clause at point.

Returns beginning and end positions of marked area, a cons. 

py-mark-def-or-class
--------------------
Mark def-or-class at point.

With universal argument or `py-mark-decorators' set to `t' decorators are marked too.
Returns beginning and end positions of marked area, a cons.

py-mark-class
-------------
Mark class at point.

With universal argument or `py-mark-decorators' set to `t' decorators are marked too.
Returns beginning and end positions of marked area, a cons.

py-mark-def
-----------
Mark def at point.

With universal argument or `py-mark-decorators' set to `t' decorators are marked too.
Returns beginning and end positions of marked area, a cons.

py-mark-clause
--------------
Mark clause at point.

Returns beginning and end positions of marked area, a cons. 

py-beginning-of-decorator
-------------------------
Go to the beginning of a decorator.

Returns position if succesful 

py-end-of-decorator
-------------------
Go to the end of a decorator.

Returns position if succesful 

py-copy-expression
------------------
Mark expression at point.

Returns beginning and end positions of marked area, a cons. 

py-copy-partial-expression
--------------------------
Mark partial-expression at point.

Returns beginning and end positions of marked area, a cons.

"." operators delimit a partial-expression expression on it's level, that's the difference to compound expressions.

Given the function below, `py-partial-expression'
called at pipe symbol would copy and return:

def usage():
    print """Usage: %s
    ....""" % (
        os.path.basename(sys.argv[0]))
------------|-------------------------
==> path

        os.path.basename(sys.argv[0]))
------------------|-------------------
==> basename(sys.argv[0]))

        os.path.basename(sys.argv[0]))
--------------------------|-----------
==> sys

        os.path.basename(sys.argv[0]))
------------------------------|-------
==> argv[0]

while `py-expression' would copy and return

(
        os.path.basename(sys.argv[0]))

;;;;;

Also for existing commands a shorthand is defined:

(defalias 'py-statement 'py-copy-statement)

py-copy-statement
-----------------
Mark statement at point.

Returns beginning and end positions of marked area, a cons. 

py-copy-block
-------------
Mark block at point.

Returns beginning and end positions of marked area, a cons. 

py-copy-block-or-clause
-----------------------
Mark block-or-clause at point.

Returns beginning and end positions of marked area, a cons. 

py-copy-def
-----------
Mark def at point.

With universal argument or `py-mark-decorators' set to `t' decorators are copied too.
Returns beginning and end positions of marked area, a cons.

py-copy-def-or-class
--------------------
Mark def-or-class at point.

With universal argument or `py-mark-decorators' set to `t' decorators are copied too.
Returns beginning and end positions of marked area, a cons.

py-copy-class
-------------
Mark class at point.

With universal argument or `py-mark-decorators' set to `t' decorators are copied too.
Returns beginning and end positions of marked area, a cons.

py-copy-clause
--------------
Mark clause at point.
  Returns beginning and end positions of marked area, a cons. 

py-kill-expression
------------------
Delete expression at point.
  Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-partial-expression
--------------------------
Delete partial-expression at point.
  Stores data in kill ring. Might be yanked back using `C-y'.

"." operators delimit a partial-expression expression on it's level, that's the difference to compound expressions.

py-kill-statement
-----------------
Delete statement at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-block
-------------
Delete block at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-block-or-clause
-----------------------
Delete block-or-clause at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-def-or-class
--------------------
Delete def-or-class at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-class
-------------
Delete class at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-def
-----------
Delete def at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-kill-clause
--------------
Delete clause at point.

Stores data in kill ring. Might be yanked back using `C-y'. 

py-forward-line
---------------
Goes to end of line after forward move.

Travels right-margin comments. 

py-beginning-of-comment
-----------------------
Go to the beginning of current line's comment, if any. 

py-leave-comment-or-string-backward
-----------------------------------
If inside a comment or string, leave it backward. 

py-beginning-of-list-pps
------------------------
Go to the beginning of a list.
Optional ARG indicates a start-position for `parse-partial-sexp'.
Return beginning position, nil if not inside.

py-beginning-of-list
--------------------
Go to beginning of any parentized, braced or bracketed expression in statement. 

py-end-of-list
--------------
Go to end of any parentized, braced or bracketed expression in statement. 

py-down-block-lc
----------------
Goto beginning of line following end of block.

Returns position reached, if successful, nil otherwise.

"-lc" stands for "left-corner" - a complementary command travelling left, whilst `py-end-of-block' stops at right corner.

See also `py-down-block': down from current definition to next beginning of block below. 

py-down-clause-lc
-----------------
Goto beginning of line following end of clause.

Returns position reached, if successful, nil otherwise.

"-lc" stands for "left-corner" - a complementary command travelling left, whilst `py-end-of-clause' stops at right corner.

See also `py-down-clause': down from current definition to next beginning of clause below. 

py-down-def-lc
--------------
Goto beginning of line following end of def.

Returns position reached, if successful, nil otherwise.

"-lc" stands for "left-corner" - a complementary command travelling left, whilst `py-end-of-def' stops at right corner.

See also `py-down-def': down from current definition to next beginning of def below. 

py-down-class-lc
----------------
Goto beginning of line following end of class.

Returns position reached, if successful, nil otherwise.

"-lc" stands for "left-corner" - a complementary command travelling left, whilst `py-end-of-class' stops at right corner.

See also `py-down-class': down from current definition to next beginning of class below. 

py-down-statement-lc
--------------------
Goto beginning of line following end of statement.

Returns position reached, if successful, nil otherwise.

"-lc" stands for "left-corner" - a complementary command travelling left, whilst `py-end-of-statement' stops at right corner.

See also `py-down-statement': down from current definition to next beginning of statement below. 

py-down-statement
-----------------
Go to the beginning of next statement below in buffer.

Returns indentation if statement found, nil otherwise. 

py-down-block
-------------
Go to the beginning of next block below in buffer.

Returns indentation if block found, nil otherwise. 

py-down-clause
--------------
Go to the beginning of next clause below in buffer.

Returns indentation if clause found, nil otherwise. 

py-down-block-or-clause
-----------------------
Go to the beginning of next block-or-clause below in buffer.

Returns indentation if block-or-clause found, nil otherwise. 

py-down-def
-----------
Go to the beginning of next def below in buffer.

Returns indentation if def found, nil otherwise. 

py-down-class
-------------
Go to the beginning of next class below in buffer.

Returns indentation if class found, nil otherwise. 

py-down-def-or-class
--------------------
Go to the beginning of next def-or-class below in buffer.

Returns indentation if def-or-class found, nil otherwise. 

py-forward-into-nomenclature
----------------------------
Move forward to end of a nomenclature section or word.

With C-u (programmatically, optional argument ARG), do it that many times.

A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores.

py-backward-into-nomenclature
-----------------------------
Move backward to beginning of a nomenclature section or word.

With optional ARG, move that many times.  If ARG is negative, move
forward.

A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores.

match-paren
-----------
Go to the matching brace, bracket or parenthesis if on its counterpart.

Otherwise insert the character, the key is assigned to, here `%'.
With universal arg  insert a `%'. 

py-toggle-execute-keep-temporary-file-p
---------------------------------------
Toggle py-execute-keep-temporary-file-p 

py-guess-default-python
-----------------------
If any Python is installed. Used by `py-shell' if `py-shell-name' is neither selected nor has a customized default value. 

py-shell-dedicated
------------------
Start an interactive Python interpreter in another window.

With optional C-u user is prompted by
`py-choose-shell' for command and options to pass to the Python
interpreter.


py-shell
--------
Start an interactive Python interpreter in another window.

With optional C-u user is prompted by
`py-choose-shell' for command and options to pass to the Python
interpreter.
Returns variable `py-process-name' used by function `get-process'.


python
------
Start an Python interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python interpreter. 

python2
-------
Start an Python2 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python2 interpreter. 

python2\.7
----------
Start an Python2.7 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python2.7 interpreter. 

python3
-------
Start an Python3 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python3 interpreter. 

python3\.2
----------
Start an Python3.2 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python3.2 interpreter. 

ipython
-------
Start an IPython interpreter in another window.

With optional C-u user is prompted
for options to pass to the IPython interpreter. 

jython
------
Start an Jython interpreter in another window.

With optional C-u user is prompted
for options to pass to the Jython interpreter. 

python-dedicated
----------------
Start an unique Python interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python interpreter. 

python2-dedicated
-----------------
Start an unique Python2 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python2 interpreter. 

python2\.7-dedicated
--------------------
Start an unique Python2.7 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python2.7 interpreter. 

python3-dedicated
-----------------
Start an unique Python3 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python3 interpreter. 

python3\.2-dedicated
--------------------
Start an unique Python3.2 interpreter in another window.

With optional C-u user is prompted
for options to pass to the Python3.2 interpreter. 

ipython-dedicated
-----------------
Start an unique IPython interpreter in another window.

With optional C-u user is prompted
for options to pass to the IPython interpreter. 

jython-dedicated
----------------
Start an unique Jython interpreter in another window.

With optional C-u user is prompted
for options to pass to the Jython interpreter. 

py-which-execute-file-command
-----------------------------
Return the command appropriate to Python version.

Per default it's "(format "execfile(r'%s') # PYTHON-MODE\n" filename)" for Python 2 series.

py-execute-region-no-switch
---------------------------
Send the region to a common shell calling a Python interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', buffer with region stays current.
 

py-execute-region-switch
------------------------
Send the region to a common shell calling a Python interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to.


py-execute-region
-----------------
Send the region to a common shell calling a Python interpreter. 

py-execute-region-dedicated
---------------------------
Get the region processed by an unique Python interpreter. 

py-execute-string
-----------------
Send the argument STRING to a Python interpreter.

See the `M-x py-execute-region' docs for an account of some
subtleties, including the use of the optional ASYNC argument.

py-shell-command-on-region
--------------------------
Execute region in a shell.

Avoids writing to temporary files.

Caveat: Can't be used for expressions containing
Unicode strings like u'\xA9' 

py-ipython-shell-command-on-region
----------------------------------
Execute region in a shell.

Avoids writing to temporary files.

Caveat: Can't be used for expressions containing
Unicode strings like u'\xA9' 

py-send-region-ipython
----------------------
Execute the region through an ipython shell. 

py-execute-region-in-shell
--------------------------
Execute the region in a Python shell. 

py-fetch-py-master-file
-----------------------
Lookup if a `py-master-file' is specified.

See also doku of variable `py-master-file' 

py-execute-import-or-reload
---------------------------
Import the current buffer's file in a Python interpreter.

If the file has already been imported, then do reload instead to get
the latest version.

If the file's name does not end in ".py", then do execfile instead.

If the current buffer is not visiting a file, do `py-execute-buffer'
instead.

If the file local variable `py-master-file' is non-nil, import or
reload the named file instead of the buffer's file.  The file may be
saved based on the value of `py-execute-import-or-reload-save-p'.

See the `M-x py-execute-region' docs for an account of some
subtleties, including the use of the optional ASYNC argument.

This may be preferable to `M-x py-execute-buffer' because:

 - Definitions stay in their module rather than appearing at top
   level, where they would clutter the global namespace and not affect
   uses of qualified names (MODULE.NAME).

 - The Python debugger gets line number information about the functions.

py-execute-buffer
-----------------
Send the contents of the buffer to a Python interpreter.

If the file local variable `py-master-file' is non-nil, execute the
named file instead of the buffer's file.
If there is a *Python* process buffer, it is used.  
If a clipping restriction is in effect, only the accessible portion of the buffer is sent. A trailing newline will be supplied if needed.

See the `M-x py-execute-region' docs for an account of some
subtleties, including the use of the optional ASYNC argument.

py-execute-buffer-no-switch
---------------------------
Like `py-execute-buffer', but ignores setting of `py-shell-switch-buffers-on-execute'.

Buffer called from is current afterwards again.

py-execute-buffer-switch
------------------------
Like `py-execute-buffer', but ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python
------------------------
Send the region to a common shell calling the python interpreter. 

py-execute-region-python-switch
-------------------------------
Send the region to a common shell calling the python interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python-no-switch
----------------------------------
Send the region to a common shell calling the python interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-python2
-------------------------
Send the region to a common shell calling the python2 interpreter. 

py-execute-region-python2-switch
--------------------------------
Send the region to a common shell calling the python2 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python2-no-switch
-----------------------------------
Send the region to a common shell calling the python2 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-python2\.7
----------------------------
Send the region to a common shell calling the python2.7 interpreter. 

py-execute-region-python2\.7-switch
-----------------------------------
Send the region to a common shell calling the python2.7 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python2\.7-no-switch
--------------------------------------
Send the region to a common shell calling the python2.7 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-python3
-------------------------
Send the region to a common shell calling the python3 interpreter. 

py-execute-region-python3-switch
--------------------------------
Send the region to a common shell calling the python3 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python3-no-switch
-----------------------------------
Send the region to a common shell calling the python3 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-python3\.2
----------------------------
Send the region to a common shell calling the python3.2 interpreter. 

py-execute-region-python3\.2-switch
-----------------------------------
Send the region to a common shell calling the python3.2 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-python3\.2-no-switch
--------------------------------------
Send the region to a common shell calling the python3.2 interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-ipython
-------------------------
Send the region to a common shell calling the ipython interpreter. 

py-execute-region-ipython-switch
--------------------------------
Send the region to a common shell calling the ipython interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-ipython-no-switch
-----------------------------------
Send the region to a common shell calling the ipython interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-region-jython
------------------------
Send the region to a common shell calling the jython interpreter. 

py-execute-region-jython-switch
-------------------------------
Send the region to a common shell calling the jython interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will being switched to. 

py-execute-region-jython-no-switch
----------------------------------
Send the region to a common shell calling the jython interpreter.

Ignores setting of `py-shell-switch-buffers-on-execute', output-buffer will not being switched to.

py-execute-defun
----------------
Send the current defun (class or method) to the inferior Python process.

py-process-file
---------------
Process "python filename".

Optional OUTPUT-BUFFER and ERROR-BUFFER might be given. 

py-exec-execfile-region
-----------------------
Execute the region in a Python interpreter. 

py-exec-execfile
----------------
Process "python filename",
Optional OUTPUT-BUFFER and ERROR-BUFFER might be given.')


py-execute-block
----------------
Send python-form at point as is to Python interpreter. 

py-execute-block-or-clause
--------------------------
Send python-form at point as is to Python interpreter. 

py-execute-class
----------------
Send python-form at point as is to Python interpreter. 

py-execute-clause
-----------------
Send python-form at point as is to Python interpreter. 

py-execute-def
--------------
Send python-form at point as is to Python interpreter. 

py-execute-def-or-class
-----------------------
Send python-form at point as is to Python interpreter. 

py-execute-expression
---------------------
Send python-form at point as is to Python interpreter. 

py-execute-partial-expression
-----------------------------
Send python-form at point as is to Python interpreter. 

py-execute-statement
--------------------
Send python-form at point as is to Python interpreter. 

py-down-exception
-----------------
Go to the next line down in the traceback.

With M-x univeral-argument (programmatically, optional argument
BOTTOM), jump to the bottom (innermost) exception in the exception
stack.

py-up-exception
---------------
Go to the previous line up in the traceback.

With C-u (programmatically, optional argument TOP)
jump to the top (outermost) exception in the exception stack.

py-output-buffer-filter
-----------------------
Clear output buffer from py-shell-input prompt etc. 

py-send-string
--------------
Evaluate STRING in inferior Python process.

py-pdbtrack-toggle-stack-tracking
---------------------------------
Set variable `py-pdbtrack-do-tracking-p'. 

turn-on-pdbtrack
----------------


turn-off-pdbtrack
-----------------


py-fetch-docu
-------------
Lookup in current buffer for the doku for the symbol at point.

Useful for newly defined symbol, not known to python yet. 

py-describe-symbol
------------------
Print help on symbol at point. 

py-describe-mode
----------------
Dump long form of Python-mode docs.

py-find-function
----------------
Find source of definition of function NAME.

Interactively, prompt for name.

py-find-imports
---------------
Find top-level imports, updating `python-imports'.

py-update-imports
-----------------
Returns `python-imports'.

Imports done are displayed in message buffer. 

py-indent-forward-line
----------------------
Indent and move one line forward to next indentation.
Returns column of line reached.

If `py-kill-empty-line' is non-nil, delete an empty line.
When closing a form, use py-close-block et al, which will move and indent likewise.
With M-x universal argument just indent.


py-dedent-forward-line
----------------------
Dedent line and move one line forward. 

py-dedent
---------
Dedent line according to `py-indent-offset'.

With arg, do it that many times.
If point is between indent levels, dedent to next level.
Return indentation reached, if dedent done, nil otherwise.

Affected by `py-dedent-keep-relative-column'. 

py-close-def
------------
Set indent level to that of beginning of function definition.

If final line isn't empty and `py-close-block-provides-newline' non-nil, insert a newline. 

py-close-class
--------------
Set indent level to that of beginning of class definition.

If final line isn't empty and `py-close-block-provides-newline' non-nil, insert a newline. 

py-close-clause
---------------
Set indent level to that of beginning of clause definition.

If final line isn't empty and `py-close-block-provides-newline' non-nil, insert a newline. 

py-close-block
--------------
Set indent level to that of beginning of block definition.

If final line isn't empty and `py-close-block-provides-newline' non-nil, insert a newline. 

py-class-at-point
-----------------
Return class definition as string.

With interactive call, send it to the message buffer too. 

ar-py-function-at-point
-----------------------
Return functions definition as string.

With interactive call, send it to the message buffer too. 

ar-py-beginning-of-function
---------------------------
Jump to the beginning of defun. Returns point. 

ar-py-beginning-of-class
------------------------
Jump to the beginning of class definition. Returns column. 

ar-py-end-of-function
---------------------
Jump to the end of function. 

ar-py-line-at-point
-------------------
Return line as string.
  With interactive call, send it to the message buffer too. 

ar-py-looking-at-keywords-p
---------------------------
If looking at a python keyword. Returns t or nil. 

ar-py-match-paren-mode
----------------------
py-match-paren-mode nil oder t

ar-py-match-paren
-----------------
Goto to the opening or closing of block before or after point.

With arg, do it that many times.
 Closes unclosed block if jumping from beginning. 

ar-py-documentation
-------------------
Launch PyDOC on the Word at Point

eva
---
Put "eval(...)" forms around strings at point. 

pst-here
--------
Kill previous "pdb.set_trace()" and insert it at point. 

py-printform-insert
-------------------
Inserts a print statement out of current `(car kill-ring)' by default, inserts ARG instead if delivered. 

py-line-to-printform-python2
----------------------------
Transforms the item on current in a print statement. 

py-switch-imenu-index-function
------------------------------
For development only. Good old renamed `py-imenu-create-index'-function hangs with medium size files already. Working `py-imenu-create-index-new' is active by default.

Switch between classic index machine `py-imenu-create-index'-function and new `py-imenu-create-index-new'.

The former may provide a more detailed report, thus delivering two different index-machines is considered. 

py-choose-shell-by-shebang
--------------------------
Choose shell by looking at #! on the first line.

Returns the specified Python resp. Jython shell command name. 

py-which-python
---------------
Returns version of Python of current default environment, a number. 

py-python-default-environment
-----------------------------
Returns path of Python default installation. 

py-toggle-shells
----------------
Toggles between the CPython and Jython default interpreter.

ARG might be a python-version string to set to.
With C-u) user is prompted for the command to use.
If no arg given and py-shell-name not set yet, shell is set according to `py-shell-name' 

py-choose-shell
---------------
Looks for an appropriate mode function.
This does the following:
 - reads py-shell-name
 - look for an interpreter with `py-choose-shell-by-shebang'
 - examine imports using `py-choose-shell-by-import'
 - default to the variable `py-shell-name'

With C-u) user is prompted to specify a reachable Python version.

python-mode
-----------
Major mode for editing Python files.

To submit a problem report, enter `M-x py-submit-bug-report' from a
`python-mode' buffer.  Do `M-x py-describe-mode' for detailed
documentation.  To see what version of `python-mode' you are running,
enter `M-x py-version'.

This mode knows about Python indentation, tokens, comments and
continuation lines.  Paragraphs are separated by blank lines only.

COMMANDS
key             binding
---             -------

C-c             Prefix Command
C-j             py-newline-and-indent
RET             py-newline-and-indent
C-x             Prefix Command
ESC             Prefix Command
#               py-electric-comment
:               py-electric-colon
s-I             py-indent-line
s-i             py-indent-forward-line
s-s             suche-settrace
<C-backspace>   py-hungry-delete-backwards
<C-return>      py-newline-and-dedent
<backspace>     py-electric-backspace
<delete>        py-electric-delete
<s-backspace>   py-dedent-forward-line

C-x n           Prefix Command

C-M-a           py-beginning-of-def-or-class
C-M-e           py-end-of-def-or-class
C-M-h           py-mark-def-or-class
M-TAB           completion-at-point
C-M-n           py-end-of-block
C-M-p           py-beginning-of-block
C-M-x           py-execute-def-or-class

C-c C-a         py-mark-statement
C-c C-b         py-submit-bug-report
C-c C-c         py-execute-buffer
C-c C-d         py-pdbtrack-toggle-stack-tracking
C-c C-e         py-describe-symbol
C-c C-f         py-sort-imports
C-c C-k         py-mark-block-or-clause
C-c C-l         py-shift-left
C-c RET         py-execute-import-or-reload
C-c C-n         py-end-of-statement
C-c C-p         py-beginning-of-statement
C-c C-q         py-end-of-block
C-c C-r         py-shift-right
C-c C-s         py-execute-string
C-c C-t         py-toggle-shells
C-c C-u         py-beginning-of-block
C-c C-v         py-version
C-c C-w         py-pychecker-run
C-c !           py-shell
C-c #           py-comment-region
C-c -           py-up-exception
C-c :           py-guess-indent-offset
C-c <           py-shift-left
C-c =           py-down-exception
C-c >           py-shift-right
C-c ?           py-describe-mode
C-c c           py-compute-indentation
C-c |           py-execute-region
C-c <delete>    py-hungry-delete-forward
C-c <tab>       py-indent-region

C-x n d         py-narrow-to-defun


VARIABLES

py-indent-offset		indentation increment
py-block-comment-prefix		comment string used by `comment-region'
py-shell-name		shell command to invoke Python interpreter
py-temp-directory		directory used for temp files (if needed)
py-beep-if-tab-change		ring the bell if `tab-width' is changed

py-def-or-class-beginning-position
----------------------------------
Returns beginning position of function or class definition. 

py-def-or-class-end-position
----------------------------
Returns end position of function or class definition. 

py-statement-beginning-position
-------------------------------
Returns beginning position of statement. 

py-statement-end-position
-------------------------
Returns end position of statement. 

py-current-indentation
----------------------
Returns beginning position of code in line. 

py-version
----------
Echo the current version of `python-mode' in the minibuffer.

run-python
----------
Run an inferior Python process, input and output via buffer *Python*.

CMD is the Python command to run.  NOSHOW non-nil means don't
show the buffer automatically.

Interactively, a prefix arg means to prompt for the initial
Python command line (default is `python-command').

A new process is started if one isn't running attached to
`python-buffer', or if called from Lisp with non-nil arg NEW.
Otherwise, if a process is already running in `python-buffer',
switch to that buffer.

This command runs the hook `inferior-python-mode-hook' after
running `comint-mode-hook'.  Type C-h m in the
process buffer for a list of commands.

By default, Emacs inhibits the loading of Python modules from the
current working directory, for security reasons.  To disable this
behavior, change `python-remove-cwd-from-path' to nil.

py-send-region
--------------
Send the region to the inferior Python process.

py-send-buffer
--------------
Send the current buffer to the inferior Python process.

py-switch-to-python
-------------------
Switch to the Python process buffer, maybe starting new process.

With prefix arg, position cursor at end of buffer.

py-send-region-and-go
---------------------
Send the region to the inferior Python process.

Then switch to the process buffer.

py-load-file
------------
Load a Python file FILE-NAME into the inferior Python process.

If the file has extension `.py' import or reload it as a module.
Treating it as a module keeps the global namespace clean, provides
function location information for debugging, and supports users of
module-qualified names.

py-set-proc
-----------
Set the default value of `python-buffer' to correspond to this buffer.

If the current buffer has a local value of `python-buffer', set the
default (global) value to that.  The associated Python process is
the one that gets input from M-x py-send-region et al when used
in a buffer that doesn't have a local value of `python-buffer'.

py-shell-redirect-send-command-to-process
-----------------------------------------
Send COMMAND to PROCESS, with output to OUTPUT-BUFFER.
With prefix arg, echo output in process buffer.

If NO-DISPLAY is non-nil, do not show the output buffer.

py-shell-complete
-----------------
Complete word before point, if any. Otherwise insert TAB. 

ipython-complete
----------------
Complete the python symbol before point. 

Only knows about the stuff in the current *Python* session.