-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Description
Hey,
I was trying to hide the prompt by setting an empty string to nbsphinx_input_prompt
. This results in a TypeError
on:
Line 1065 in 77f305b
prompt = prompt_template % (execution_count,) |
The blame is the %
format. Would you consider switching to format
asking user to set the string as "In [{}]"
rather than "In [%s]"
. This will be more robust, see:
In [6]: "hello" % "dummy"
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-a2bd27e7e4d9> in <module>
----> 1 "hello" % "dummy"
TypeError: not all arguments converted during string formatting
In [7]: "hello".format("dummy")
Out[7]: 'hello'
In [8]: "hello {}".format(12)
Out[8]: 'hello 12'
Another possibility would be to test for %s
.
Note: I use that workaround for my initial purpose.
Metadata
Metadata
Assignees
Labels
No labels