Full command line as it was typed

后端 未结 8 2098
猫巷女王i
猫巷女王i 2020-12-01 20:56

I want to get the full command line as it was typed.

This:

\" \".join(sys.argv[:])

doesn\'t work here (deletes double quotes). Also I pr

8条回答
  •  难免孤独
    2020-12-01 21:05

    In a Unix environment, this is not generally possible...the best you can hope for is the command line as passed to your process.

    Because the shell (essentially any shell) may munge the typed command line in several ways before handing it to the OS for execution.

提交回复
热议问题