안녕하세요~
질문 주셔서 감사합니다.
제가 2.5와 3.0에 대해서 둘다 로컬에 설치해 놓고 다음과 같이 테스트해 보았습니다.
C:\>c:\Python30\python.exe c:\Python30\Lib\pydoc.py sqlite3
Help on package sqlite3:
NAME
sqlite3
FILE
c:\python30\lib\sqlite3\__init__.py
PACKAGE CONTENTS
dbapi2
dump
test (package)
CLASSES
builtins.Exception(builtins.BaseException)
Error
DatabaseError
DataError
IntegrityError
InternalError
NotSupportedError
OperationalError
ProgrammingError
InterfaceError
Warning
builtins.object
Cache
Connection
Cursor
PrepareProtocol
Row
Statement
class Cache(builtins.object)
| Methods defined here:
|
| __init__(...)
| x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
|
| display(...)
| For debugging only.
|
| get(...)
| Gets an entry from the cache or calls the factory function
to produc
e one.
|
C:\>c:\Python25\python.exe c:\Python25\Lib\pydoc.py sqlite3
Help on package sqlite3:
NAME
sqlite3
FILE
c:\python25\lib\sqlite3\__init__.py
DESCRIPTION
#-*- coding: ISO-8859-1 -*-
# pysqlite2/__init__.py: the pysqlite2 package.
#
# Copyright (C) 2005 Gerhard H?ing <
g...@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or
implied
# warranty. In no event will the authors be held liable for any
damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any
purpose,
# including commercial applications, and to alter it and
redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you
must not
# claim that you wrote the original software. If you use this
software
# in a product, an acknowledgment in the product documentation
would be
# appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and
must not be
# misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source
distribution.
PACKAGE CONTENTS
dbapi2
test (package)
CLASSES
__builtin__.object
Cache
Connection
Cursor
PrepareProtocol
Row
Statement
exceptions.StandardError(exceptions.Exception)
Error
보시다시피 둘다 잘 동작합니다.
그러나 3.1에 대해서 테스트해 보니 말씀하신 바와 같이 에러가 나네요.
C:>c:\Python31\python.exe c:\Python31\Lib\pydoc.py sqlite3
Traceback (most recent call last):
File "c:\Python31\Lib\pydoc.py", line 2328, in <module>
if __name__ == '__main__': cli()
File "c:\Python31\Lib\pydoc.py", line 2297, in cli
help.help(arg)
File "c:\Python31\Lib\pydoc.py", line 1755, in help
elif request: doc(request, 'Help on %s:')
File "c:\Python31\Lib\pydoc.py", line 1506, in doc
pager(render_doc(thing, title, forceload))
File "c:\Python31\Lib\pydoc.py", line 1321, in pager
pager(text)
File "c:\Python31\Lib\pydoc.py", line 1339, in <lambda>
return lambda text: tempfilepager(plain(text), 'more <')
File "c:\Python31\Lib\pydoc.py", line 1372, in tempfilepager
file.write(text)
UnicodeEncodeError: 'cp949' codec can't encode character '\xe4' in
position 238:
illegal multibyte sequence
말씀하신 것과는 약간 다르지만, 인코딩 에러가 납니다.
아마도 3.1에서의 오류로 생각됩니다. 조만간 fix 되겠죠?
그때까지는 아래와 같이 파일로 써서 사용해야 할듯 합니다... ㅠㅜ;
C:\>c:\Python31\python.exe c:\Python31\Lib\pydoc.py -w sqlite3
wrote sqlite3.html
감사합니다.