Skip to content

allow using normal indent width in shell in IDLE #41957

Closed

Description

@jshute
mannequin
BPO 1196946
Nosy @kbkaiser
Files
  • usetabsinshell.patch: patch
  • usetabsinshell2.patch: new version of patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/kbkaiser'
    closed_at = <Date 2007-02-05.04:30:32.000>
    created_at = <Date 2005-05-06.23:26:20.000>
    labels = ['expert-IDLE']
    title = 'allow using normal indent width in shell in IDLE'
    updated_at = <Date 2007-02-05.04:30:32.000>
    user = 'https://bugs.python.org/jshute'

    bugs.python.org fields:

    activity = <Date 2007-02-05.04:30:32.000>
    actor = 'kbk'
    assignee = 'kbk'
    closed = True
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2005-05-06.23:26:20.000>
    creator = 'jshute'
    dependencies = []
    files = ['6647', '6648']
    hgrepos = []
    issue_num = 1196946
    keywords = ['patch']
    message_count = 4.0
    messages = ['48309', '48310', '48311', '48312']
    nosy_count = 3.0
    nosy_names = ['kbk', 'jimjjewett', 'jshute']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1196946'
    versions = []

    Activity

    1. jshute commented on May 6, 2005

      jshutemannequin
      MannequinAuthor

      IDLE currently ignores the indent width setting in the
      main shell window, and forces it to use tab characters,
      8 spaces wide. This is ugly, and causes problems when
      you write code in the shell and then cut-and-paste it
      into a real editor window.

      This patch adds an option (off by default) to honour
      the indent width setting in the PyShell window rather
      than using tabs. This makes it much nicer to edit
      commands that use several levels of indenting.

      The only reason for this to be an option, and for it to
      be off by default, is that it looks a little weird when
      the second line of code is indented, but still lines up
      with the first indented line because the prompt is also
      4 characters wide. Fixing it so this would not look
      weird would be nice, but would require a lot of Tk
      hacking and might make the gui slower.

    2. jimjjewett commented on May 11, 2005

      jimjjewettmannequin
      Mannequin

      Logged In: YES
      user_id=764593

      Would using a continuation prompt of " "*len(sys.ps1) solve
      the problem? (standard module) code uses a continuation
      prompt of "... " which gets the spacing right, though it doesn't
      do your indents for you.

    3. jshute commented on May 12, 2005

      jshutemannequin
      MannequinAuthor

      Logged In: YES
      user_id=39615

      Hmm, I had only considered using a continuation of "...".
      Using spaces would make things look mostly right, and will
      have odd behaviour only when you cut-and-paste into an
      editor, since you will get an extra indentation level, but
      that won't cause errors and is easily fixed.

      Here is a new patch that implements it this way. I think
      doing it this way solves the problem well enough that the
      preference is not necessary. (Or both patches can be
      applied to get this behaviour and the preference.)

    4. kbkaiser commented on Feb 5, 2007

      @kbkaiser
      Contributor

      Sorry. Doesn't really solve the problem.

    5. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions