mirror of https://github.com/flaggo/pydu.git
add doc for cmd.chcp
This commit is contained in:
parent
22703bbebf
commit
d58adff648
15
docs/cmd.rst
15
docs/cmd.rst
|
@ -28,3 +28,18 @@ Cmd
|
||||||
>>> from pydu.cmd import cmdline_argv
|
>>> from pydu.cmd import cmdline_argv
|
||||||
>>> cmdline_argv()
|
>>> cmdline_argv()
|
||||||
['/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py', '61253', '61254']
|
['/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py', '61253', '61254']
|
||||||
|
|
||||||
|
|
||||||
|
.. py:function:: pydu.cmd.chcp()
|
||||||
|
|
||||||
|
Context manager which sets the active code page number.
|
||||||
|
It could also be used as function.
|
||||||
|
|
||||||
|
>>> from pydu.cmd import chcp
|
||||||
|
>>> chcp(437)
|
||||||
|
<ctive code page number: 437>
|
||||||
|
>>> with chcp(437):
|
||||||
|
... pass
|
||||||
|
>>>
|
||||||
|
|
||||||
|
.. note:: ``chcp`` can only be used on ``Windows`` system.
|
||||||
|
|
Loading…
Reference in New Issue