[Tutor] OT (probably): How to change default tab key value to 4 spaces in GNOME Terminal?
DL Neil
PyTutor at danceswithmice.info
Sun Apr 26 18:42:01 EDT 2020
On 27/04/20 8:02 AM, Peter Otten wrote:
> boB Stepp wrote:
>> On Sun, Apr 26, 2020 at 4:18 AM Peter Otten <__peter__ at web.de> wrote:
>>> Peter Otten wrote:
>>> But then I saw that this is already implemented for interpreters newer
>>> than my aging default 3.4:
>>>
>>> [rlcomplete.py]
>>> if not text.strip():
>>> if state == 0:
>>> if _readline_available:
>>> readline.insert_text('\t')
>>> readline.redisplay()
>>> return ''
>>> else:
>>> return '\t'
...
> Keep a copy of the original file in case you mess up, or do the right thing
> and write your own subclass in a separate module and override the complete()
> method there. See the bottom of rlcomplete.py to learn how to install your
> custom Completer.
Definitely sub-class it!
Is there a risk that a Python-update (plus PSL) might over-write?
Would it be necessary to place all such code and settings in user-space,
and 'point' to it using PYTHONSTARTUP (or similar/better)?
This whole area is not something I've looked at, glossing right-over in
favor of typing "python3 [file/dirNM]" and enjoying the plain-vanilla
flavor. However, the idea of modifying the prompts and improving the
tab-spacing would offer considerable advantages when it comes to
presenting example-code, eg consistency, auto-magic
version-labelling/dating for currency-context, more compact...
Keep it going guys!
--
Regards =dn
More information about the Tutor
mailing list