2013-01-10 1 views
2

두 가지 질문이 있습니다.Snow Leopard에서 Python과 함께 제공되는 기본 패키지를 찾는데 문제가 발생했습니다.

먼저 Mac OS-X 10.6.8 Snow Leopard에서 어떤 Python 모듈 (및 해당 버전)이 제공되는지 어떻게 알 수 있습니까?

두 번째, 스노우 레오파드와 거래 한 내용은 Tix입니까? 나는 이것을 절대 이해할 수 없다. Tix을 가져 오면 오류가 없습니다. 대화 형으로 입력하는 경우

>>> help(Tix) 

나는 Tix 사용에 대한 정보가 메가 바이트입니다. 더 이상 진행되면 ...

>>> root = Tix.Tk() 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tix.py", line 210, in __init__ 
_tkinter.TclError: can't find package Tix 
>>> 

아, 미망인이 열리지만 오류가 계속 발생합니다. 나는 창을 클릭하고 메뉴 막대가 "파이썬"이라고 말했다는 것을 알아 차렸다. 아래, "파일"에서 "실행 위젯 데모"를 볼 수 있습니다. 나는 그것을 시작하고 모든 Tix 데모가 실행됩니다. 데모의 "코드보기"를 클릭하면 Tcl과 같은 모든 것을 볼 수 있습니다.

Tcl/Tk는 버전 8.5x이고, Tix가 설치되어 있으며 Python으로 가져올 수 있지만 사용할 수 없습니까?

답변

2
  • 맥 OS X 10.6 파이썬 2.6.1와 함께 제공됩니다.

  • 해당 플랫폼의 TKinter 버전은 Apple 8.5.7이며 알려진 문제점이 있습니다. IDLE은 예를 들어 실행되지 않습니다.

자세한 내용은 Python.org의 IDLE and tkinter with Tcl/Tk on Mac OS X page을 참조하십시오.

10.6 컴퓨터에 help('modules')에 대한

터미널 출력 :

$ sw_vers -productVersion 
10.6.8 
$ /usr/bin/python 
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> help('modules') 

Please wait a moment while I gather a list of all available modules... 

/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: twisted.flow is unmaintained. 
    __import__(name) 
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py:12: DeprecationWarning: the sha module is deprecated; use the hashlib module instead 
    import sha 
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. 
    warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.") 
2013-01-10 09:36:31.224 Python[68800:b07] Error loading /Developer/Library/Frameworks/InterfaceBuilderKit.framework/InterfaceBuilderKit: dlopen(/Developer/Library/Frameworks/InterfaceBuilderKit.framework/InterfaceBuilderKit, 265): Library not loaded: @rpath/DevToolsRemoteClient.framework/Versions/A/DevToolsRemoteClient 
    Referenced from: /Developer/Library/Frameworks/InterfaceBuilderKit.framework/InterfaceBuilderKit 
    Reason: image not found 
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pkgutil.py:110: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible. 
    __import__(name) 
AddressBook   _Win    dumbdbm    py2app 
AppKit    __builtin__   dummy_thread  py_compile 
AppleScriptKit  __future__   dummy_threading  pyclbr 
Audio_mac   _abcoll    easy_install  pydoc 
Automator   _ast    email    pydoc_topics 
BaseHTTPServer  _bisect    encodings   pyexpat 
Bastion    _builtinSuites  errno    pygame 
CFNetwork   _bytesio   exceptions   quopri 
CGIHTTPServer  _codecs    ez_setup   random 
CalendarStore  _codecs_cn   fcntl    re 
Canvas    _codecs_hk   fetchmailconf  readline 
Carbon    _codecs_iso2022  filecmp    repr 
Cocoa    _codecs_jp   fileinput   resource 
CodeWarrior   _codecs_kr   findertools   rexec 
Collaboration  _codecs_tw   fnmatch    rfc822 
ColorPicker   _collections  formatter   rlcompleter 
ConfigParser  _csv    fpformat   robotparser 
Cookie    _ctypes    fractions   runpy 
CoreData   _ctypes_test  ftplib    sched 
CoreFoundation  _curses    functools   select 
CoreGraphics  _curses_panel  future_builtins  sets 
CoreText   _elementtree  gc     setuptools 
Dialog    _fileio    genericpath   sgmllib 
DictionaryServices _functools   gensuitemodule  sha 
DocXMLRPCServer  _hashlib   gestalt    shelve 
EasyDialogs   _heapq    getopt    shlex 
ExceptionHandling _hotshot   getpass    shutil 
Explorer   _json    gettext    signal 
FSEvents   _locale    glob    site 
FileDialog   _lsprof    grp     smtpd 
Finder    _multibytecodec  gzip    smtplib 
FixTk    _multiprocessing hashlib    sndhdr 
Foundation   _random    heapq    socket 
FrameWork   _socket    hmac    sqlite3 
HTMLParser   _sqlite3   hotshot    sre 
IN     _sre    htmlentitydefs  sre_compile 
InputMethodKit  _ssl    htmllib    sre_constants 
InstallerPlugins _strptime   httplib    sre_parse 
InstantMessage  _struct    ic     ssl 
InterfaceBuilderKit _symtable   icglue    stat 
JavaScriptCore  _testcapi   icopen    statvfs 
LatentSemanticMapping _threading_local idlelib    string 
LaunchServices  _tkinter   ihooks    stringold 
MacOS    _warnings   imageop    stringprep 
Message    _weakref   imaplib    strop 
MimeWriter   abc     imghdr    struct 
MiniAEFrame   aepack    imp     subprocess 
Nav     aetools    imputil    sunau 
Netscape   aetypes    inspect    sunaudio 
OSATerminology  aifc    io     svn 
OpenSSL    altgraph   itertools   symbol 
PixMapWrapper  anydbm    json    symtable 
PreferencePanes  applesingle   keyword    sys 
PubSub    appletrawmain  lib2to3    syslog 
PyObjCTools   appletrunner  libsvn    tabnanny 
PyRSS2Gen   argvemulator  linecache   tarfile 
QTKit    array    locale    telnetlib 
Quartz    ast     logging    tempfile 
Queue    asynchat   macerrors   terminalcommand 
ScreenSaver   asyncore   macholib   termios 
ScriptingBridge  atexit    macostools   test 
ScrolledText  audiodev   macpath    textwrap 
SearchKit   audioop    macresource   this 
SimpleDialog  autoGIL    macurl2path   thread 
SimpleHTTPServer base64    mailbox    threading 
SimpleXMLRPCServer bdb     mailcap    time 
SocketServer  bdist_mpkg   markupbase   timeit 
StdSuites   bgenlocations  marshal    tkColorChooser 
StringIO   binascii   math    tkCommonDialog 
SyncServices  binhex    md5     tkFileDialog 
SystemConfiguration bisect    mhlib    tkFont 
SystemEvents  bonjour    mimetools   tkMessageBox 
Tix     bsddb    mimetypes   tkSimpleDialog 
Tkconstants   bsddb185   mimify    toaiff 
Tkdnd    buildtools   mmap    token 
Tkinter    bundlebuilder  modulefinder  tokenize 
UserDict   bz2     modulegraph   trace 
UserList   cPickle    multifile   traceback 
UserString   cProfile   multiprocessing  tty 
VBoxPython2_5  cStringIO   mutex    turtle 
VBoxPython2_6  calendar   netrc    twisted 
WebKit    cfmfile    new     types 
XgridFoundation  cgi     nis     unicodedata 
_AE     cgitb    nntplib    unittest 
_AH     chunk    ntpath    urllib 
_App    cmath    nturl2path   urllib2 
_CF     cmd     numbers    urlparse 
_CG     code    numpy    user 
_CarbonEvt   codecs    objc    uu 
_Cm     codeop    opcode    uuid 
_Ctl    collections   operator   vboxapi 
_Dlg    colorsys   optparse   vboxshell 
_Drag    commands   os     videoreader 
_Evt    compileall   os2emxpath   warnings 
_File    compiler   parser    wave 
_Fm     contextlib   pdb     weakref 
_Folder    cookielib   pickle    webbrowser 
_Help    copy    pickletools   whichdb 
_IBCarbon   copy_reg   pimp    wsgiref 
_Icn    crypt    pipes    wx 
_LWPCookieJar  csv     pkg_resources  wxPython 
_Launch    ctypes    pkgutil    wxaddons 
_List    curses    platform   wxversion 
_Menu    datetime   plistlib   xattr 
_Mlte    dateutil   popen2    xdrlib 
_MozillaCookieJar dbhash    poplib    xml 
_OSA    dbm     posix    xmllib 
_Qd     decimal    posixfile   xmlrpclib 
_Qdoffs    difflib    posixpath   xxsubtype 
_Qt     dircache   pprint    zipfile 
_Res    dis     profile    zipimport 
_Scrap    distutils   pstats    zlib 
_Snd    dl     pty     zope 
_TE     doctest    pwd     

Enter any module name to get more help. Or, type "modules spam" to search 
for modules whose descriptions contain the word "spam". 

패키지를 해당 시스템에 이상이 설치 기본이 아닌 추가 기능하고있는이 pygamevboxapi (VBoxPython2_6, vboxapi, vboxshellVBoxPython2_5), 나머지는해야 표준 문제.

+0

깨진 링크 :'IDLE 및 tkinter with Tcl/Tk with Mac OS X 페이지' – nbro

+0

@Rinzler : corrected; 당신이해야 할 일은 정말 제목에 대한 구글이었다. 올해 초 링크가 깨졌고'getit'이'download'로 바뀌 었습니다. –

+0

그런데 요즘 Mac OS X 10.10.2 용 64 비트 용 'Tix'버전을 알고 있습니까? 나는 ActiveState에 Tcl 8.4, 아키텍처 macosx10.5-i386-x86_64를위한'Tix' 버전이 있음을 알고 있지만 분명히 내 컴퓨터와 호환되지 않습니다. – nbro

1

Mac OS-X 10.6.8 Snow Leopard에는 어떤 Python 모듈 (및 해당 버전)이 포함되어 있는지 어떻게 알 수 있습니까?

은 파이썬 터미널에 다음을 입력 :

help('modules') 
관련 문제