How to make python interactive console based on blocks rather than lines

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I want my python interactive console in terminal to work like the one in pycharm or something like jupyter notebook but I can't find how.



For example when I do:



>>> def foo():
... print('Make it work nice')
...
>>>


And then I press up arrow I want to see something like this:



>>> def foo():
... print('Make it work nice')
...


Where I can edit both lines. but I get only this:



>>> print('Make it work nice')


So is it possible to make it work as I want and if not is there any extremely lightweight tool(something smaller than an IDE or Browser. something as heavy as VIM for example)










share|improve this question



























    up vote
    0
    down vote

    favorite












    I want my python interactive console in terminal to work like the one in pycharm or something like jupyter notebook but I can't find how.



    For example when I do:



    >>> def foo():
    ... print('Make it work nice')
    ...
    >>>


    And then I press up arrow I want to see something like this:



    >>> def foo():
    ... print('Make it work nice')
    ...


    Where I can edit both lines. but I get only this:



    >>> print('Make it work nice')


    So is it possible to make it work as I want and if not is there any extremely lightweight tool(something smaller than an IDE or Browser. something as heavy as VIM for example)










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want my python interactive console in terminal to work like the one in pycharm or something like jupyter notebook but I can't find how.



      For example when I do:



      >>> def foo():
      ... print('Make it work nice')
      ...
      >>>


      And then I press up arrow I want to see something like this:



      >>> def foo():
      ... print('Make it work nice')
      ...


      Where I can edit both lines. but I get only this:



      >>> print('Make it work nice')


      So is it possible to make it work as I want and if not is there any extremely lightweight tool(something smaller than an IDE or Browser. something as heavy as VIM for example)










      share|improve this question















      I want my python interactive console in terminal to work like the one in pycharm or something like jupyter notebook but I can't find how.



      For example when I do:



      >>> def foo():
      ... print('Make it work nice')
      ...
      >>>


      And then I press up arrow I want to see something like this:



      >>> def foo():
      ... print('Make it work nice')
      ...


      Where I can edit both lines. but I get only this:



      >>> print('Make it work nice')


      So is it possible to make it work as I want and if not is there any extremely lightweight tool(something smaller than an IDE or Browser. something as heavy as VIM for example)







      command-line python






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 16 at 19:47









      dessert

      20k55795




      20k55795










      asked Feb 16 at 17:56









      ladybug

      31




      31




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          IPython is the shell in Jupyter. You can install it with pip:



          sudo pip3 install ipython


          Note that IPython is also available in the Ubuntu repos, but it's a much older version.






          share|improve this answer



























            up vote
            0
            down vote













            Have a look at ptpython. It's not in the repositories but you can easily install it via pip3.






            share|improve this answer






















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006862%2fhow-to-make-python-interactive-console-based-on-blocks-rather-than-lines%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote



              accepted










              IPython is the shell in Jupyter. You can install it with pip:



              sudo pip3 install ipython


              Note that IPython is also available in the Ubuntu repos, but it's a much older version.






              share|improve this answer
























                up vote
                0
                down vote



                accepted










                IPython is the shell in Jupyter. You can install it with pip:



                sudo pip3 install ipython


                Note that IPython is also available in the Ubuntu repos, but it's a much older version.






                share|improve this answer






















                  up vote
                  0
                  down vote



                  accepted







                  up vote
                  0
                  down vote



                  accepted






                  IPython is the shell in Jupyter. You can install it with pip:



                  sudo pip3 install ipython


                  Note that IPython is also available in the Ubuntu repos, but it's a much older version.






                  share|improve this answer












                  IPython is the shell in Jupyter. You can install it with pip:



                  sudo pip3 install ipython


                  Note that IPython is also available in the Ubuntu repos, but it's a much older version.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 16 at 19:14









                  wjandrea

                  7,25842256




                  7,25842256






















                      up vote
                      0
                      down vote













                      Have a look at ptpython. It's not in the repositories but you can easily install it via pip3.






                      share|improve this answer


























                        up vote
                        0
                        down vote













                        Have a look at ptpython. It's not in the repositories but you can easily install it via pip3.






                        share|improve this answer
























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Have a look at ptpython. It's not in the repositories but you can easily install it via pip3.






                          share|improve this answer














                          Have a look at ptpython. It's not in the repositories but you can easily install it via pip3.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 16 at 19:22









                          wjandrea

                          7,25842256




                          7,25842256










                          answered Feb 16 at 18:21









                          Florian Diesch

                          63k16157176




                          63k16157176



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006862%2fhow-to-make-python-interactive-console-based-on-blocks-rather-than-lines%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              pylint3 and pip3 broken

                              Missing snmpget and snmpwalk

                              How to enroll fingerprints to Ubuntu 17.10 with VFS491