File: variables-python-mode.rst

package info (click to toggle)
python-mode 1%3A6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,440 kB
  • ctags: 3,272
  • sloc: lisp: 32,583; sh: 1,418; python: 757; makefile: 41
file content (995 lines) | stat: -rw-r--r-- 28,818 bytes parent folder | download
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
python-mode.el variables

====================

python-mode-modeline-display
----------------------------
String to display in Emacs modeline 

py-indent-offset
----------------
Amount of offset per level of indentation.
`M-x py-guess-indent-offset' can usually guess a good value when
you're editing someone else's Python code.

py-backslashed-lines-indent-offset
----------------------------------
Amount of offset per level of indentation of backslashed.
No semantic indent,  which diff to `py-indent-offset' indicates 

pdb-path
--------
Where to find pdb.py. Edit this according to your system.

If you ignore the location `M-x py-guess-pdb-path' might display it

py-verbose-p
------------
If indenting functions should report reached indent level.

Default is nil. 

py-store-result-p
-----------------
When non-nil, put resulting string of `py-execute-...' into kill-ring, so it might be yanked.

Default is nil

py-load-skeletons-p
-------------------
If skeleton definitions should be loaded, default is nil. 

py-load-pymacs-p
----------------
If Pymacs related stuff should be loaded.

Default is nil.

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

py-smart-operator-mode-p
------------------------
If python-mode calls (smart-operator-mode-on)

Default is non-nil. 

py-sexp-function
----------------
When set, it's value is called instead of `forward-sexp', `backward-sexp'

Default is nil. 

py-autopair-mode
----------------
If python-mode calls (autopair-mode-on)

Default is nil
Load `autopair-mode' written by Joao Tavora <joaotavora [at] gmail.com>
URL: http://autopair.googlecode.com 

py-no-completion-calls-dabbrev-expand-p
---------------------------------------
If completion function should call dabbrev-expand when no completion found. Default is `t'

See also `py-indent-no-completion-p'

py-indent-no-completion-p
-------------------------
If completion function should insert a TAB when no completion found. Default is `t'

See also `py-no-completion-calls-dabbrev-expand-p'

py-set-fill-column-p
--------------------
If python-mode should set fill-column

according values in `py-comment-fill-column' and `py-docstring-fill-column'.
Default is  nil

py-autofill-timer-delay
-----------------------
Delay when idle before functions ajusting  `py-docstring-fill-column' resp. `py-comment-fill-column' are called. 

py-docstring-fill-column
------------------------
Value of `fill-column' to use when filling a docstring.
Any non-integer value means do not use a different value of
`fill-column' when filling docstrings.

py-comment-fill-column
----------------------
Value of `fill-column' to use when filling a comment.
Any non-integer value means do not use a different value of
`fill-column' when filling docstrings.

py-fontify-shell-buffer-p
-------------------------
If code in Python shell should be highlighted as in script buffer.

Default is nil.

If `t', related vars like `comment-start' will be set too.
Seems convenient when playing with stuff in IPython shell
Might not be TRT when a lot of output arrives 

py-modeline-display-full-path-p
-------------------------------
If the full PATH/TO/PYTHON should be displayed in shell modeline.

Default is nil. Note: when `py-shell-name' is specified with path, it's shown as an acronym in buffer-name already. 

py-modeline-acronym-display-home-p
----------------------------------
If the modeline acronym should contain chars indicating the home-directory.

Default is nil 

py-install-directory
--------------------
Directory where python-mode.el and it's subdirectories should be installed. Needed for completion and other environment stuff only. 

py-guess-py-install-directory-p
-------------------------------
If in cases, `py-install-directory' isn't set,  `py-set-load-path'should guess it from `buffer-file-name'. 

py-extensions
-------------
File where extensions to python-mode.el should be installed. Used by virtualenv support. 

py-pylint-offer-current-p
-------------------------
If current buffers file should be offered for check.

Default is non-nil. If nil, `py-pylint-run' offers filename from history 

py-hide-show-minor-mode-p
-------------------------
If hide-show minor-mode should be on, default is nil. 

empty-comment-line-separates-paragraph-p
----------------------------------------
Consider paragraph start/end lines with nothing inside but comment sign.

Default is  non-nil

py-if-name-main-permission-p
----------------------------
Allow execution of code inside blocks started
by "if __name__== '__main__':".

Default is non-nil

py-use-font-lock-doc-face-p
---------------------------
If documention string inside of def or class get `font-lock-doc-face'.

`font-lock-doc-face' inherits `font-lock-string-face'.
Call M-x `customize-face' in order to have a visible effect. 

py-defun-use-top-level-p
------------------------
When non-nil, keys C-M-a, C-M-e address top-level form.

Default is nil.

Beginning- end-of-defun forms use
commands `py-beginning-of-top-level', `py-end-of-top-level'

mark-defun marks top-level form at point etc.


py-tab-shifts-region-p
----------------------
If `t', TAB will indent/cycle the region, not just the current line.

Default is  nil

py-tab-indents-region-p
-----------------------
When `t' and first TAB doesn't shift, indent-region is called.

Default is  nil

py-block-comment-prefix-p
-------------------------
If py-comment inserts py-block-comment-prefix.

Default is t

py-org-cycle-p
--------------
When non-nil, command `org-cycle' is available at shift-TAB, <backtab>

Default is nil. 

ipython-complete-use-separate-shell-p
-------------------------------------
If `ipython-complete' should use a separate shell. Thus prompt-counter is not incremented by completion. 

py-outline-minor-mode-p
-----------------------
If outline minor-mode should be on, default is `t'. 

py-outline-mode-keywords
------------------------
Keywords composing visible heads. 

py-start-run-py-shell
---------------------
If `python-mode' should start a python-shell, `py-shell'.

Default is `nil'. 

py-start-run-ipython-shell
--------------------------
If `python-mode' should start an ipython-shell.

Default is `nil'. 

py-close-provides-newline
-------------------------
If a newline is inserted, when line after block isn't empty. Default is non-nil. 

py-dedent-keep-relative-column
------------------------------
If point should follow dedent or kind of electric move to end of line. Default is t - keep relative position. 

py-indent-honors-multiline-listing
----------------------------------
If `t', indents to 1+ column of opening delimiter. If `nil', indent adds one level to the beginning of statement. Default is `nil'. 

py-indent-paren-spanned-multilines-p
------------------------------------
If non-nil, indents elements of list a value of `py-indent-offset' to first element:

def foo():
    if (foo &&
            baz):
        bar()

Default lines up with first element:

def foo():
    if (foo &&
        baz):
        bar()


py-indent-honors-inline-comment
-------------------------------
If non-nil, indents to column of inlined comment start.
Default is nil. 

py-closing-list-dedents-bos
---------------------------
When non-nil, indent list's closing delimiter like start-column.

It will be lined up under the first character of
 the line that starts the multi-line construct, as in:

my_list = [
    1, 2, 3,
    4, 5, 6,
]

result = some_function_that_takes_arguments(
    'a', 'b', 'c',
    'd', 'e', 'f',
)

Default is nil, i.e.

my_list = [
    1, 2, 3,
    4, 5, 6,
    ]
result = some_function_that_takes_arguments(
    'a', 'b', 'c',
    'd', 'e', 'f',
    )

Examples from PEP8


py-closing-list-space
---------------------
Number of chars, closing parenthesis outdent from opening, default is 1 

py-closing-list-keeps-space
---------------------------
If non-nil, closing parenthesis dedents onto column of opening plus `py-closing-list-space', default is nil 

py-electric-kill-backward-p
---------------------------
Affects `py-electric-backspace'. Default is nil.

If behind a delimited form of braces, brackets or parentheses,
backspace will kill it's contents

With when cursor after
my_string[0:1]
--------------^

==>

my_string[]
----------^

In result cursor is insided emptied delimited form.

py-electric-colon-active-p
--------------------------
`py-electric-colon' feature.  Default is `nil'. See lp:837065 for discussions.

See also `py-electric-colon-bobl-only' 

py-electric-colon-bobl-only
---------------------------
When inserting a colon, do not indent lines unless at beginning of block

See lp:1207405 resp. `py-electric-colon-active-p' 

py-electric-colon-greedy-p
--------------------------
If py-electric-colon should indent to the outmost reasonable level.

If nil, default, it will not move from at any reasonable level. 

py-electric-colon-newline-and-indent-p
--------------------------------------
If non-nil, `py-electric-colon' will call `newline-and-indent'.  Default is `nil'. 

py-electric-comment-p
---------------------
If "#" should call `py-electric-comment'. Default is `nil'. 

py-electric-comment-add-space-p
-------------------------------
If py-electric-comment should add a space.  Default is `nil'. 

py-mark-decorators
------------------
If py-mark-def-or-class functions should mark decorators too. Default is `nil'. 

py-tab-indent
-------------
Non-nil means TAB in Python mode calls `py-indent-line'.

py-return-key
-------------
Which command <return> should call. 

py-complete-function
--------------------
When set, enforces function todo completion, default is nil.

Normally python-mode, resp. inferior-python-mode know best which function to use. 

ipython-complete-function
-------------------------
Function used for completion in IPython shell buffers. 

py-encoding-string
------------------
Default string specifying encoding of a Python file. 

py-shebang-startstring
----------------------
Detecting the shell in head of file. 

py-python-command-args
----------------------
List of string arguments to be used when starting a Python shell.

py-jython-command-args
----------------------
List of string arguments to be used when starting a Jython shell.

py-cleanup-temporary
--------------------
If temporary buffers and files used by functions executing region should be deleted afterwards. 

py-execute-no-temp-p
--------------------
Seems Emacs-24.3 provided a way executing stuff without temporary files. 

py-lhs-inbound-indent
---------------------
When line starts a multiline-assignment: How many colums indent should be more than opening bracket, brace or parenthesis. 

py-continuation-offset
----------------------
Additional amount of offset to give for some continuation lines.
Continuation lines are those that immediately follow a backslash
terminated line. 

py-indent-tabs-mode
-------------------
Python-mode starts `indent-tabs-mode' with the value specified here, default is nil. 

py-smart-indentation
--------------------
Should `python-mode' try to automagically set some indentation variables?
When this variable is non-nil, two things happen when a buffer is set
to `python-mode':

    1. `py-indent-offset' is guessed from existing code in the buffer.
       Only guessed values between 2 and 8 are considered.  If a valid
       guess can't be made (perhaps because you are visiting a new
       file), then the value in `py-indent-offset' is used.

    2. `indent-tabs-mode' is turned off if `py-indent-offset' does not
       equal `tab-width' (`indent-tabs-mode' is never turned on by
       Python mode).  This means that for newly written code, tabs are
       only inserted in indentation if one tab is one indentation
       level, otherwise only spaces are used.

Note that both these settings occur *after* `python-mode-hook' is run,
so if you want to defeat the automagic configuration, you must also
set `py-smart-indentation' to nil in your `python-mode-hook'.

py-block-comment-prefix
-----------------------
String used by M-x comment-region to comment out a block of code.
This should follow the convention for non-indenting comment lines so
that the indentation commands won't get confused (i.e., the string
should be of the form `#x...' where `x' is not a blank or a tab, and
`...' is arbitrary).  However, this string should not end in whitespace.

py-indent-comments
------------------
When t, comment lines are indented. 

py-uncomment-indents-p
----------------------
When non-nil, after uncomment indent lines. 

py-separator-char
-----------------
Values set by defcustom only will not be seen in batch-mode. 

py-custom-temp-directory
------------------------
If set, will take precedence over guessed values from `py-temp-directory'. Default is the empty string.

When set, make sure the directory exists. 

py-beep-if-tab-change
---------------------
Ring the bell if `tab-width' is changed.
If a comment of the form

  	# vi:set tabsize=<number>:

is found before the first code line when the file is entered, and the
current value of (the general Emacs variable) `tab-width' does not
equal <number>, `tab-width' is set to <number>, a message saying so is
displayed in the echo area, and if `py-beep-if-tab-change' is non-nil
the Emacs bell is also rung as a warning.

py-jump-on-exception
--------------------
Jump to innermost exception frame in *Python Output* buffer.
When this variable is non-nil and an exception occurs when running
Python code synchronously in a subprocess, jump immediately to the
source code of the innermost traceback frame.

py-ask-about-save
-----------------
If not nil, ask about which buffers to save before executing some code.
Otherwise, all modified buffers are saved without asking.

py-backspace-function
---------------------
Function called by `py-electric-backspace' when deleting backwards.

py-delete-function
------------------
Function called by `py-electric-delete' when deleting forwards.

py-pdbtrack-do-tracking-p
-------------------------
Controls whether the pdbtrack feature is enabled or not.
When non-nil, pdbtrack is enabled in all comint-based buffers,
e.g. shell buffers and the *Python* buffer.  When using pdb to debug a
Python program, pdbtrack notices the pdb prompt and displays the
source file and line that the program is stopped at, much the same way
as gud-mode does for debugging C programs with gdb.

py-pdbtrack-filename-mapping
----------------------------
Supports mapping file paths when opening file buffers in pdbtrack.
When non-nil this is an alist mapping paths in the Python interpreter
to paths in Emacs.

py-pdbtrack-minor-mode-string
-----------------------------
String to use in the minor mode list when pdbtrack is enabled.

py-import-check-point-max
-------------------------
Maximum number of characters to search for a Java-ish import statement.
When `python-mode' tries to calculate the shell to use (either a
CPython or a Jython shell), it looks at the so-called `shebang' line
-- i.e. #! line.  If that's not available, it looks at some of the
file heading imports to see if they look Java-like.

py-jython-packages
------------------
Imported packages that imply `jython-mode'.

py-current-defun-show
---------------------
If `py-current-defun' should jump to the definition, highlight it while waiting PY-WHICH-FUNC-DELAY seconds, before returning to previous position.

Default is `t'.

py-current-defun-delay
----------------------
When called interactively, `py-current-defun' should wait PY-WHICH-FUNC-DELAY seconds at the definition name found, before returning to previous position. 

py-send-receive-delay
---------------------
Seconds to wait for output, used by `py-send-receive'. 

py-honor-IPYTHONDIR-p
---------------------
When non-nil ipython-history file is constructed by $IPYTHONDIR
followed by "/history". Default is nil.

Otherwise value of py-ipython-history is used. 

py-ipython-history
------------------
ipython-history default file. Used when py-honor-IPYTHONDIR-p is nil (default) 

py-honor-PYTHONHISTORY-p
------------------------
When non-nil python-history file is set by $PYTHONHISTORY
Default is nil.

Otherwise value of py-python-history is used. 

py-python-history
-----------------
python-history default file. Used when py-honor-PYTHONHISTORY-p is nil (default) 

py-master-file
--------------
If non-nil, M-x py-execute-buffer executes the named
master file instead of the buffer's file.  If the file name has a
relative path, the value of variable `default-directory' for the
buffer is prepended to come up with a file name.

Beside you may set this variable in the file's local
variable section, e.g.:

    # Local Variables:
    # py-master-file: "master.py"
    # End:



py-pychecker-command
--------------------
Shell command used to run Pychecker.

py-pychecker-command-args
-------------------------
List of string arguments to be passed to pychecker.

py-pep8-command
---------------
Shell command used to run pep8.

py-pep8-command-args
--------------------
List of string arguments to be passed to pylint.

Default is "" 

py-pyflakespep8-command
-----------------------
Shell command used to run `pyflakespep8'.

py-pyflakespep8-command-args
----------------------------
List of string arguments to be passed to pyflakespep8.

Default is "" 

py-pyflakes-command
-------------------
Shell command used to run Pyflakes.

py-pyflakes-command-args
------------------------
List of string arguments to be passed to pyflakes.

Default is "" 

py-pylint-command
-----------------
Shell command used to run Pylint.

py-pylint-command-args
----------------------
List of string arguments to be passed to pylint.

Default is "--errors-only" 

py-shell-input-prompt-1-regexp
------------------------------
A regular expression to match the input prompt of the shell.

py-shell-input-prompt-2-regexp
------------------------------
A regular expression to match the input prompt of the shell after the
  first line of input.

py-shell-prompt-read-only
-------------------------
If non-nil, the python prompt is read only.  Setting this
variable will only effect new shells.

py-fileless-buffer-use-default-directory-p
------------------------------------------
When `py-use-current-dir-when-execute-p' is non-nil and no buffer-file exists, value of `default-directory' sets current working directory of Python output shell

py-keep-shell-dir-when-execute-p
--------------------------------
Don't change Python shell's current working directory when sending code.

See also `py-execute-directory'

py-switch-buffers-on-execute-p
------------------------------
When non-nil switch to the Python output buffer. 

py-split-windows-on-execute-p
-----------------------------
When non-nil split windows. 

py-max-split-windows
--------------------
When split windows is enabled the maximum windows to allow
  before reusing other windows.

py-split-windows-on-execute-function
------------------------------------
How window should get splitted to display results of py-execute-... functions. 

py-hide-show-keywords
---------------------
Keywords composing visible heads.
Also used by (minor-)outline-mode 

py-hide-show-hide-docstrings
----------------------------
Controls if doc strings can be hidden by hide-show

py-paragraph-fill-docstring-p
-----------------------------
If `py-fill-paragraph', when inside a docstring, should fill the complete string.

Default is nil.

Convenient use of `M-q' inside docstrings
See also `py-docstring-style'


python-mode-hook
----------------
Hook run after entering python-mode-modeline-display mode.
No problems result if this variable is not bound.
`add-hook' automatically binds it.  (This is true for all hook variables.)

py-imenu-create-index-p
-----------------------
Non-nil means Python mode creates and displays an index menu of functions and global variables. 

py-imenu-create-index-function
------------------------------
Switch between `py-imenu-create-index-new', which also lists modules variables,  and series 5. index-machine

py-shell-name
-------------
A PATH/TO/EXECUTABLE or default value `py-shell' may look for, if no shell is specified by command. 

py-shell-toggle-1
-----------------
A PATH/TO/EXECUTABLE or default value used by `py-toggle-shell'. 

py-shell-toggle-2
-----------------
A PATH/TO/EXECUTABLE or default value used by `py-toggle-shell'. 

py-match-paren-mode
-------------------
Non-nil means, cursor will jump to beginning or end of a block.
This vice versa, to beginning first.
Sets `py-match-paren-key' in python-mode-map.
Customize `py-match-paren-key' which key to use. 

py-match-paren-key
------------------
String used by M-x comment-region to comment out a block of code.
This should follow the convention for non-indenting comment lines so
that the indentation commands won't get confused (i.e., the string
should be of the form `#x...' where `x' is not a blank or a tab, and
`...' is arbitrary).  However, this string should not end in whitespace.

py-kill-empty-line
------------------
If t, py-indent-forward-line kills empty lines. 

py-remove-cwd-from-path
-----------------------
Whether to allow loading of Python modules from the current directory.
If this is non-nil, Emacs removes '' from sys.path when starting
an inferior Python process.  This is the default, for security
reasons, as it is easy for the Python process to be started
without the user's realization (e.g. to perform completion).

py-imenu-show-method-args-p
---------------------------
Controls echoing of arguments of functions & methods in the Imenu buffer.
When non-nil, arguments are printed.

py-history-filter-regexp
------------------------
Input matching this regexp is not saved on the history list.
Default ignores all inputs of 0, 1, or 2 non-blank characters.

inferior-python-filter-regexp
-----------------------------
Input matching this regexp is not saved on the history list.
Default ignores all inputs of 0, 1, or 2 non-blank characters.

py-set-complete-keymap-p
------------------------
If `py-complete-initialize', which sets up enviroment for Pymacs based py-complete, should load it's keys into `python-mode-map'

Default is nil.
See also resp. edit `py-complete-set-keymap' 

py-use-local-default
--------------------
If `t', py-shell will use `py-shell-local-path' instead
  of default Python.

Making switch between several virtualenv's easier,
 `python-mode' should deliver an installer, so named-shells pointing to virtualenv's will be available. 

py-highlight-error-source-p
---------------------------
When py-execute-... commands raise an error, respective code in source-buffer will be highlighted. Default is nil.

M-x `py-remove-overlays-at-point' removes that highlighting.
 

py-set-pager-cat-p
------------------
If the shell environment variable $PAGER should set to `cat'.

If `t', use `C-c C-r' to jump to beginning of output. Then scroll normally.

Avoids lp:783828, "Terminal not fully functional", for help('COMMAND') in python-shell

When non-nil, imports module `os' 

py-prompt-on-changed-p
----------------------
When called interactively, ask for save before a changed buffer is sent to interpreter.

Default is `t'

py-dedicated-process-p
----------------------
If commands executing code use a dedicated shell.

Default is nil

py-shell-local-path
-------------------
If `py-use-local-default' is non-nil, `py-shell' will use EXECUTABLE indicated here incl. path. 

py-edit-only-p
--------------
When `t' `python-mode' will not take resort nor check for installed Python executables. Default is nil.

See bug report at launchpad, lp:944093. 

py-force-py-shell-name-p
------------------------
When `t', execution with kind of Python specified in `py-shell-name' is enforced, possibly shebang doesn't take precedence. 

python-mode-v5-behavior-p
-------------------------
Execute region through `shell-command-on-region' as
v5 did it - lp:990079. This might fail with certain chars - see UnicodeEncodeError lp:550661

py-trailing-whitespace-smart-delete-p
-------------------------------------
Default is nil. When t, python-mode calls
    (add-hook 'before-save-hook 'delete-trailing-whitespace nil 'local)

Also commands may delete trailing whitespace by the way.
When editing other peoples code, this may produce a larger diff than expected 

py-newline-delete-trailing-whitespace-p
---------------------------------------
Delete trailing whitespace maybe left by `py-newline-and-indent'.

Default is `t'. See lp:1100892 

py-warn-tmp-files-left-p
------------------------
Messages a warning, when `py-temp-directory' contains files susceptible being left by previous Python-mode sessions. See also lp:987534 

py-ipython-execute-delay
------------------------
Delay needed by execute functions when no IPython shell is running. 

python-shell-buffer-name
------------------------
Default buffer name for Python interpreter.

python-shell-interpreter
------------------------
Default Python interpreter for shell.

python-shell-prompt-regexp
--------------------------
Regular Expression matching top-level input prompt of python shell.
It should not contain a caret (^) at the beginning.

py-ffap-p
---------
Select python-modes way to find file at point.

Default is nil 

python-ffap-setup-code
----------------------
Python code to get a module path.

py-ffap-string-code
-------------------
Python code used to get a string with the path of a module.

py-eldoc-setup-code
-------------------
Python code to setup documentation retrieval.

py-setup-codes
--------------
List of code run by `py-shell-send-setup-codes'.

py-shell-prompt-regexp
----------------------
Regular Expression matching top-level input prompt of python shell.
It should not contain a caret (^) at the beginning.

python-shell-completion-setup-code
----------------------------------
Code used to setup completion in inferior Python processes.

python-shell-module-completion-string-code
------------------------------------------
Python code used to get completions separated by semicolons for imports.

For IPython v0.11, add the following line to
`python-shell-completion-setup-code':

from IPython.core.completerlib import module_completion

and use the following as the value of this variable:

';'.join(module_completion('''%s'''))

strip-chars-before
------------------
Regexp indicating which chars shall be stripped before STRING - which is defined by `string-chars-preserve'.

strip-chars-after
-----------------
Regexp indicating which chars shall be stripped after STRING - which is defined by `string-chars-preserve'.

py-docstring-style
------------------
Implemented styles are DJANGO, ONETWO, PEP-257, PEP-257-NN,
SYMMETRIC, and NIL.

A value of NIL won't care about quotes
position and will treat docstrings a normal string, any other
value may result in one of the following docstring styles:

DJANGO:

    """
    Process foo, return bar.
    """

    """
    Process foo, return bar.

    If processing fails throw ProcessingError.
    """

ONETWO:

    """Process foo, return bar."""

    """
    Process foo, return bar.

    If processing fails throw ProcessingError.

    """

PEP-257:

    """Process foo, return bar."""

    """Process foo, return bar.

    If processing fails throw ProcessingError.

    """

PEP-257-NN:

    """Process foo, return bar."""

    """Process foo, return bar.

    If processing fails throw ProcessingError.
    """

SYMMETRIC:

    """Process foo, return bar."""

    """
    Process foo, return bar.

    If processing fails throw ProcessingError.
    """

py-execute-directory
--------------------
When set, stores the file's default directory-name py-execute-... functions act upon.

Used by Python-shell for output of `py-execute-buffer' and related commands. See also `py-use-current-dir-when-execute-p'

py-use-current-dir-when-execute-p
---------------------------------
When `t', current directory is used by Python-shell for output of `py-execute-buffer' and related commands.

See also `py-execute-directory'

py-shell-prompt-output-regexp
-----------------------------
Regular Expression matching output prompt of python shell.
It should not contain a caret (^) at the beginning.

py-output-buffer
----------------
When `py-enforce-output-buffer-p' is non-nil, provides the
default for output-buffer. 

py-enforce-output-buffer-p
--------------------------
When non-nil, current value of `py-output-buffer' is used for output,
regardless of environment. Default is nil

py-underscore-word-syntax-p
---------------------------
If underscore chars should be of syntax-class `word', not of `symbol'.

Underscores in word-class makes `forward-word' etc. travel the indentifiers. Default is `t'.

See bug report at launchpad, lp:940812