Skip to content

Commit 199e0dd

Browse files
committed
update copybutton to skip prompts, outputs
1 parent b750119 commit 199e0dd

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@
124124
# Align inline math with text
125125
imgmath_use_preview = True
126126

127+
# Skip prompts when using copy button
128+
copybutton_prompt_text = r">>> |\.\.\. "
129+
copybutton_prompt_is_regexp = True
130+
127131
# Theme options are theme-specific and customize the look and feel of a theme
128132
# further. For a list of options available for each theme, see the
129133
# documentation.

doc/linear.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ Time sampling
318318
Continuous time systems can be converted to discrete time systems using
319319
the :func:`sample_system` function and specifying a sampling time::
320320

321-
>> csys = ct.rss(4, 2, 2, name='csys')
322-
>> dsys = ct.sample_system(csys, 0.1, method='bilinear')
323-
>> print(dsys)
321+
>>> csys = ct.rss(4, 2, 2, name='csys')
322+
>>> dsys = ct.sample_system(csys, 0.1, method='bilinear')
323+
>>> print(dsys)
324324
<StateSpace>: cys$sampled
325325
Inputs (2): ['u[0]', 'u[1]']
326326
Outputs (2): ['y[0]', 'y[1]']

doc/xferfcn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ Time delays are not directly representable in `python-control`, but
155155
the :func:`pade` function generates a linear system that approximates
156156
a time delay to a given order::
157157

158-
>> num, den = ct.pade(0.1, 3)
159-
>> delay = ct.tf(num, den, name='delay')
160-
>> print(delay)
158+
>>> num, den = ct.pade(0.1, 3)
159+
>>> delay = ct.tf(num, den, name='delay')
160+
>>> print(delay)
161161
<TransferFunction>: delay
162162
Inputs (1): ['u[0]']
163163
Outputs (1): ['y[0]']

0 commit comments

Comments
 (0)