341
說明:
|
← 2009-04-01 04:14:21 修訂第 3 版 ⇥
342
converted to 1.6 markup
|
這個顏色代表刪除的 | 這個顏色代表增加的 |
行號 1: | 行號 1: |
shlex 是 CPython 內建的 module ,是一個簡單的 lexical analyzer ,可以用來分析類似 UNIX shell 的 token 。例如有一字串「 ab 'de fg' hi 」,要如何 split 成 ['ab', 'de fg', 'hi'] ,而非 ['ab', '\'de', 'fg\'', 'hi'] ? | shlex 是 CPython 內建的 module ,是一個簡單的 lexical analyzer ,可以用來分析類似 UNIX shell 的 token 。例如有一字串「 ab 'de fg' hi 」,要如何 split 成 ['ab', 'de fg', 'hi'] ,而非 ['ab', '\'de', 'fg\' ', 'hi'] ? |
shlex 是 CPython 內建的 module ,是一個簡單的 lexical analyzer ,可以用來分析類似 UNIX shell 的 token 。例如有一字串「 ab 'de fg' hi 」,要如何 split 成 ['ab', 'de fg', 'hi'] ,而非 ['ab', '\'de', 'fg\' ', 'hi'] ?