[Bug 1315733] [NEW] Python interactive interpreter does not indent with tabs, tries to tab-complete

Erik B. Andersen erik.b.andersen+azendale at gmail.com
Sat May 3 18:45:11 UTC 2014


Public bug reported:

Using the python3 interactive interpreter, I can not use tabs to indent
like I could on previous versions of Ubuntu (13.10 was what I was using
before, now I'm using 14.04).

When I try to indent on the python interpreter command line, it simply
does nothing the first time I press the tab key. The second time I press
it, it shows a bunch of autocomplete suggestions.

For example
>>> if (True):
... <tab>print("true!")
  File "<stdin>", line 2
    print("true!")
        ^
IndentationError: expected an indented block

Could this be related to http://bugs.python.org/issue18988? Is the fix
for that included in the version of python on 14.04?

I also found http://stackoverflow.com/questions/4809820/tab-key-not-
indenting-in-python, in which one of the comments to an answer suggests
trying <Ctrl-V><tab> when you want to insert a tab. That does work for
me:

>>> if (True):
... <Ctrl-V><tab>print("true")
... 
true

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python3 3.4.0-0ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: nvidia zfs zunicode zavl zcommon znvpair
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Sat May  3 11:36:57 2014
SourcePackage: python3-defaults
UpgradeStatus: Upgraded to trusty on 2014-04-19 (14 days ago)

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug regression-release trusty

** Tags added: regression-release

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1315733

Title:
  Python interactive interpreter does not indent with tabs, tries to
  tab-complete

Status in “python3-defaults” package in Ubuntu:
  New

Bug description:
  Using the python3 interactive interpreter, I can not use tabs to
  indent like I could on previous versions of Ubuntu (13.10 was what I
  was using before, now I'm using 14.04).

  When I try to indent on the python interpreter command line, it simply
  does nothing the first time I press the tab key. The second time I
  press it, it shows a bunch of autocomplete suggestions.

  For example
  >>> if (True):
  ... <tab>print("true!")
    File "<stdin>", line 2
      print("true!")
          ^
  IndentationError: expected an indented block

  Could this be related to http://bugs.python.org/issue18988? Is the fix
  for that included in the version of python on 14.04?

  I also found http://stackoverflow.com/questions/4809820/tab-key-not-
  indenting-in-python, in which one of the comments to an answer
  suggests trying <Ctrl-V><tab> when you want to insert a tab. That does
  work for me:

  >>> if (True):
  ... <Ctrl-V><tab>print("true")
  ... 
  true

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: python3 3.4.0-0ubuntu2
  ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
  Uname: Linux 3.13.0-24-generic x86_64
  NonfreeKernelModules: nvidia zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.14.1-0ubuntu3
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat May  3 11:36:57 2014
  SourcePackage: python3-defaults
  UpgradeStatus: Upgraded to trusty on 2014-04-19 (14 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1315733/+subscriptions



More information about the foundations-bugs mailing list