Python for S60是赛班系统的Python。既可以Interactive的输入命令,也可以运行脚本。帮助信息可以通过函数help获得,如查询有哪些modules,可以使用命令>>>help('modules'),或输入>>>help(),然后输入modules,不过由于module太多,显示的缓存太小,只能显示最后的一些modules。如何查看所有的输出,方法是将屏幕输出重定向到文件。导入sys模块,sys.stdout的值可能为<series60_console.Console instance at 0x17649b8>,只要将该属性设为文件的句柄就可以,文件句柄可以通过fh=open('filename','w')获得。给sys.stdout赋值前先保存该值以便恢复。将文件句柄赋予sys.stdout后,再输入>>>help('modules')或>>>print help('modules')屏幕无输出,查看fh对应的文件就可以看到所有的模块信息。最后有必要恢复sys.stdout的原值和关闭fh,fh.close()。
附上模块列表
help>
Please wait a moment while I gather a list of all available modules...
BaseHTTPServer copy_reg logs shlex
ConfigParser csv mailbox shutil
Cookie decimal markupbase site
DocXMLRPCServer difflib marshal smtplib
HTMLParser dir_iter md5 sndhdr
MimeWriter dircache messaging socket
Queue dis mhlib sre
SimpleHTTPServer doctest mime sre_compile
SocketServer dom mimetools sre_constants
StringIO dumbdbm mimetypes sre_parse
UserDict dummy_thread multifile stat
UserList dummy_threading netrc string
UserString e32 new stringprep
_LWPCookieJar e32calendar ntpath strop
_MozillaCookieJar e32dbm nturl2path struct
__builtin__ email opcode subprocess
__future__ encodings optparse symbol
_ast etree os symtable
_codecs exceptions parsers sys
_sre filecmp pdb sysinfo
_strptime fileinput pickle tarfile
_threading_local fnmatch pickletools telephone
aifc formatter pkgutil tempfile
anydbm fpformat platform textwrap
appuifw ftplib popen2 threading
asynchat functools positioning time
asyncore gc posix token
atexit getopt posixpath tokenize
audio gettext pprint topwindow
base64 gles_utils profile trace
bdb glob pstats traceback
binhex graphics pty tty
bisect gzip py_compile types
btconsole hashlib pyclbr unittest
btsocket heapq pydoc urllib
cProfile hmac quopri urllib2
calendar hotshot random urlparse
camera htmlentitydefs re uu
cgi htmllib repr uuid
chunk httplib rfc822 viewfinder
cmd imaplib robotparser warnings
code imghdr runpy wave
codecs imp sax weakref
codeop inspect sensor whichdb
colorsys interactive_console sensor_api wsgiref
commands key_codes sensor_defs xdrlib
compiler keycapture sensorfw xml
consolidated_imports keyword series60_console xmllib
contacts linecache sets xmlrpclib
contextlib locale sgmllib zipfile
cookielib location sha zipimport
copy logging shelve zlib
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".