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

Block Comment uncomment does not work (for me). #905

Closed
spyder-bot opened this issue Feb 17, 2015 · 4 comments
Closed

Block Comment uncomment does not work (for me). #905

spyder-bot opened this issue Feb 17, 2015 · 4 comments

Comments

@spyder-bot
Copy link
Collaborator

From is.that....@googlemail.com on 2012-01-09T21:21:25Z

Spyder Version: 2.1.6
Python Version: 2.7.2
Qt Version: 4.7.3, PyQt4 (API v1) 4.8.5 on Linux

What steps will reproduce the problem?

  1. block comment
    1. unblock comment (either per ctrl+5 or via menu) What is the expected output? What do you see instead? expected would be to remove the leading # and the lines
      above and beneath the codeblock that was blockcommented,
      while either marking every line inside a block,
      or the whole block
      (like when block commented through ctrl+4 or menu)

hope its not my fault ;)
thx for the otherwise very fine working program

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

@spyder-bot
Copy link
Collaborator Author

From is.that....@googlemail.com on 2012-01-09T18:24:38Z

btw im running from source like so

$ ./bootstrap.py --gui=pyqt
Executing Spyder from source checkout Revision 1850 +:7bf24a9ca99d+, Branch: default

  1. Patched sys.path with /home/spider/workspace_python/spyderlib
  2. Skipping GUI toolkit detection
  3. Imported Spyder 2.1.6 (Qt 4.7.3 via PyQt4 (API v1) 4.8.5)
    0x. Enforcing parent console (Windows only)
  4. Executing spyder.main()

@spyder-bot
Copy link
Collaborator Author

From daniel...@gmail.com on 2012-10-15T01:21:06Z

I have the same issue (and I hope this respond helps):

Spyder Version: 2.1.9
Python Version: 2.7.3
Qt Version: 4.8.1, PyQt4 (API v2) 4.9.1 on Linux

What steps will reproduce the problem?

  1. on any file use block comment
  2. try to remove block comment (either via ctrl+5 or the menu)

What is the expected output? What do you see instead?
I'm expecting the block comment to disappear.
Instead nothing changes in the editor and I get an "AttributeError: 'unicode' object has no attribute 'startsWith'" in the internal console window.

Please provide any additional information below

.
Here's the traceback from the internal console:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 1903, in unblockcomment
if __is_comment_bar(cursor1):
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/sourcecode/codeeditor.py", line 1900, in __is_comment_bar
return cursor.block().text().startsWith('#' + '='*79)
AttributeError: 'unicode' object has no attribute 'startsWith'

In case this is important: I'm running Kubuntu 12.04 and installed python and spyder from the standard ubuntu repository.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-04T13:05:09Z

It sure helps, thanks for the additionnal infos.

Status: Started

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-04T13:07:22Z

This issue was updated by revision cf84cba775cf .

Status: Fixed

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