程式框架¶
The modules described in this chapter are frameworks that will largely dictate the structure of your program. Currently the modules described here are all oriented toward writing command-line interfaces.
The full list of modules described in this chapter is:
turtle
--- 龜圖學 (Turtle graphics)- 介紹
- 教學
- How to...
- Turtle graphics reference
- Methods of RawTurtle/Turtle and corresponding functions
- Methods of TurtleScreen/Screen and corresponding functions
- Public classes
- Explanation
- Help and configuration
turtledemo
--- Demo scripts- Changes since Python 2.6
- Changes since Python 3.0
cmd
--- Support for line-oriented command interpretersCmd
- Cmd 物件
Cmd.cmdloop()
Cmd.do_help()
Cmd.onecmd()
Cmd.emptyline()
Cmd.default()
Cmd.completedefault()
Cmd.columnize()
Cmd.precmd()
Cmd.postcmd()
Cmd.preloop()
Cmd.postloop()
Cmd.prompt
Cmd.identchars
Cmd.lastcmd
Cmd.cmdqueue
Cmd.intro
Cmd.doc_header
Cmd.misc_header
Cmd.undoc_header
Cmd.ruler
Cmd.use_rawinput
- Cmd Example
shlex
--- Simple lexical analysissplit()
join()
quote()
shlex
- shlex 物件
shlex.get_token()
shlex.push_token()
shlex.read_token()
shlex.sourcehook()
shlex.push_source()
shlex.pop_source()
shlex.error_leader()
shlex.commenters
shlex.wordchars
shlex.whitespace
shlex.escape
shlex.quotes
shlex.escapedquotes
shlex.whitespace_split
shlex.infile
shlex.instream
shlex.source
shlex.debug
shlex.lineno
shlex.token
shlex.eof
shlex.punctuation_chars
- Parsing Rules
- Improved Compatibility with Shells