Issue
I am using Spyder IDE, and I need some help with code blocks in it.
I am currently trying to work with code blocks, since I felt it removes the need to compile the whole program every time, and also the method of partial selection of code and running it.
I have checked Console settings in Preferences but couldn't find any solution..
But I have a problem When I create a code block using # %% and write some code in it, for example:
# %%
a = input('Enter your first name: ')
b = input('Enter your last name: ')
print('\nYour name is',a,b)
When I run this code block, the whole code present in the block is pasted into the Console and then it is executed.
Is there a way to avoid it?
Solution
(Spyder maintainer here) This is already solved and it'll be part of Spyder 4 (our next major version, to be released later in 2019).
For this version we added a function called runcell
, which will run a cell without the need of pasting its entire contents into the console.
Answered By - Carlos Cordoba
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.