Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation is missing when copy paste in external console #6

Closed
spyder-bot opened this issue Feb 16, 2015 · 3 comments
Closed

Indentation is missing when copy paste in external console #6

spyder-bot opened this issue Feb 16, 2015 · 3 comments

Comments

@spyder-bot
Copy link
Collaborator

From david.fo...@gmail.com on 2009-08-19T08:44:56Z

What steps will reproduce the problem?

  1. in the editor, write a class or a method
    1. copy the lines and paste to an interactive external console What is the expected output? What do you see instead? The class or function or anything should copy with the same identation then
      in the editor (still removing a common indent if by exemple a method from a
      class is copied).
      Instead, the second line always misses an identation, which then makes an
      error in the interpreter.

By exemple, in the editor I have:
class cSomeClass():

def __init__(self):

    pass

def foo():

    print('it works')

Copy paste in an interactive external console:

class cSomeClass():

def __init__(self):

    pass

def foo():

    print('it works')

...
IndentationError: unexpected indent

In the Interactive Shell it is correct

class cSomeClass():

... def init(self):

... pass

... def foo():

... print('it works')

...

What version of the product are you using? On what operating system? pydee 0.4.21 and spyder 1.0.0b2, but I think that it as been like that
before
I run ubuntu and kubuntu

Please provide any additional information below

. I will use this section to point out some thingns I would love to see.

  1. I work a lot with the interactive console (not external) and I like much
    the ctrl+F9 short cut to send a selection to the interpreter. Would it be
    hard to also have this feature in the external console in interactive mode

  2. I often use the external consol, for it is advantageous for avoiding to
    crash pydee/spyder when a code freezes. More importantly then that, it is
    much faster at evaluating the series of lines of the code. Why is the
    interactive console (not the external) is so slow at parsing lines? Would
    it be easy to speed it up. The long time it takes to parse a long piece of
    code (exemple a long class with a little new modification) is certainly the
    thing I find the most disadvantageous compared to other IDE. But there is
    no wory, I like so much Pydee/Spyder, that I defenitely will stay with it
    and keep working with it!

  3. The code completion in the console works very well with the loaded
    modules. Is it possible to activate the code completion from the api and
    loaded module in the editor? Exemple, if scipy is imported in the
    interactive console, in the editor, "scipy." will trigger the code
    completion showing available methods.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=6

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2009-08-19T12:22:17Z

You're right: actually, the multiline paste feature is not implemented in the
External Console and there is no technical reason for that, just some code from
Interactive Console which has not been factorized yet. Thanks for reporting this
because I completely forgot to do this.

Regarding your other ideas:

  1. no problem, I'll had a Ctrl+F5 shortcut as soon as the multiline paste feature is
    implemented
  2. Could you open an issue to explain in details this performance problem with the
    Interactive Console?
  3. I'll open an issue myself on this

Status: Accepted
Labels: Milestone-Release1.0

@spyder-bot spyder-bot added this to the Release1.0 milestone Feb 16, 2015
@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2009-08-19T14:08:05Z

Fixed in v1.0.0beta3

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2011-04-24T07:32:13Z

This issue was closed by revision b0300c975265 .

goanpeca pushed a commit to goanpeca/spyder that referenced this issue Jun 4, 2020
goanpeca pushed a commit to goanpeca/spyder that referenced this issue Jun 4, 2020
rear1019 added a commit to procitec/spyder that referenced this issue Nov 3, 2021
PySide2 crashes otherwise (as of PySide2/Qt 5.15.0):

Received signal 6
#0 0x7fecd2bcea7b base::debug::CollectStackTrace()
spyder-ide#1 0x7fecd299bbaf base::debug::StackTrace::StackTrace()
spyder-ide#2 0x7fecd299bb62 base::debug::StackTrace::StackTrace()
spyder-ide#3 0x7fecd2bcd61e base::debug::(anonymous namespace)::StackDumpSignalHandler()
spyder-ide#4 0x7fed08461210 <unknown>
spyder-ide#5 0x7fed0846118b gsignal
spyder-ide#6 0x7fed08440859 abort
spyder-ide#7 0x7fed08119882 fatal_error.lto_priv.0
spyder-ide#8 0x7fed0811989f Py_FatalError
spyder-ide#9 0x7fed03c8c50b SetError_Argument
spyder-ide#10 0x7fed03c5d64e Shiboken::setErrorAboutWrongArguments()
spyder-ide#11 0x7fece240f259 Sbk_QTreeViewFunc_setExpanded
<shortened>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant