mirror of https://github.com/flaggo/pydu.git
add pydu.cmd.cmdline_argv() to cmd doc
This commit is contained in:
parent
057edbf43d
commit
87765a808e
14
docs/cmd.rst
14
docs/cmd.rst
|
@ -14,3 +14,17 @@ Cmd
|
||||||
(0, b'hello\r\n') # Python 3
|
(0, b'hello\r\n') # Python 3
|
||||||
>>> execute('echo hello', wait=False)
|
>>> execute('echo hello', wait=False)
|
||||||
<subprocess.Popen at 0x22e4010f9e8>
|
<subprocess.Popen at 0x22e4010f9e8>
|
||||||
|
|
||||||
|
|
||||||
|
.. function:: pydu.cmd.cmdline_argv()
|
||||||
|
|
||||||
|
Get command line argv of self python process. On Windows when using Python 2,
|
||||||
|
``cmdline_argv`` is implemented by using ``shell32.GetCommandLineArgvW`` to get
|
||||||
|
sys.argv as a list of Unicode strings. On other system or using Python 3,
|
||||||
|
``cmdline_argv`` is same to ``sys.argv``.
|
||||||
|
|
||||||
|
There is an example on PyCharm Python Console:
|
||||||
|
|
||||||
|
>>> from pydu.cmd import cmdline_argv
|
||||||
|
>>> cmdline_argv()
|
||||||
|
['/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py', '61253', '61254']
|
||||||
|
|
Loading…
Reference in New Issue