From d58adff6483f641a2f4c295af6131b280dcb3b7b Mon Sep 17 00:00:00 2001 From: Prodesire Date: Fri, 22 Dec 2017 19:05:21 +0800 Subject: [PATCH] add doc for cmd.chcp --- docs/cmd.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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.