I've been thinking to use
# %%
instead of
##
as cell markers, for two reasons:
1. It'd be far more easier to parse.
2. We could combine them with IPython cell magics, like this:
# %%timeit
print 'foo'
Cheers,
Carlos
El 03/03/13 11:36, Sylvain Corlay escribió:
Opened issue 1292
<http://code.google.com/p/spyderlib/issues/detail?id=1292&q=MS%3Dv2.2&sort=-modified&colspec=ID%20MS%20Stars%20Priority%20Modified%20Cat%20Type%20Status%20Owner%20Summary> regarding
this.
Sylvain
On Sunday, March 3, 2013 12:03:55 AM UTC-5, Sylvain Corlay wrote:
A very short change that does it in
spyderlib/widgets/sourcecode/mixins.py, from line 186:
def _is_separator(cursor):
cursor0 = QTextCursor(cursor)
cursor0.select(QTextCursor.BlockUnderCursor)
- text = unicode(cursor0.selectedText())
- return len(text.strip()) == 0 or text.lstrip()[0] == '#'
+ text = unicode(cursor0.selectedText()).lstrip()
+ return text[:2] == '##' or text[:12] == '# <codecell>'
What do you think of it?
S.
On Saturday, March 2, 2013 9:49:29 PM UTC-5, Sylvain Corlay wrote:
Hi,
I think that Mark's proposal is interesting. One could give
the choice between delimiters "##" and "# <codecell>" which is
the default delimiter when exporting an ipython notebook as a
python script.
Sylvain
On Thursday, December 20, 2012 1:24:09 AM UTC-5, David wrote:
If you select the region of code you want to run, then
press F9, it will be executed.
I believe this was done in response to previous requests
for a cell mode in spyder, and should be good enough for
most purposes. If you really need cell mode for python
code, then consider using the IPython notebook
(http://ipython.org/)
On Tuesday, 18 December 2012 07:46:47 UTC+11, Mark Dean
wrote:
Dear all,
Is there any way to get spyder to execute code in
blocks marked off by a delimiter. For example a double
quote ##?
Thanks a lot,
Mark
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.