diff --git a/docs/cmd.rst b/docs/cmd.rst index 2a5154e..6bf85fb 100644 --- a/docs/cmd.rst +++ b/docs/cmd.rst @@ -28,3 +28,18 @@ Cmd >>> from pydu.cmd import cmdline_argv >>> cmdline_argv() ['/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) + + >>> with chcp(437): + ... pass + >>> + + .. note:: ``chcp`` can only be used on ``Windows`` system.