Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    313

    [jython ]importare libreria tkInter

    Salve a tutti.Sto usando jython per permettere a java di interfacciarsi con python.Ho fatto uno script dove vengono importate delle librerie per l'audio..le snack in particolare tkSnack..ma mi dice che non trova il modulo tkInter..come devo fare per importarlo nella cartella del jython

  2. #2
    Jython di default non include Tkinter. Devi installarlo separatamente:
    http://jtkinter.sourceforge.net/
    Rilasciata Python FTP Server library 0.5.1
    http://code.google.com/p/pyftpdlib/

    We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    313
    Ho cercato di fare tutte le operazioni scritte nel link postato ma mi dice:
    codice:
    Exception in thread "AWT-EventQueue-0" Traceback (innermost last):
      File "C:\Documents and Settings\gennaro\Desktop\script.py", line 1, in ?
      File "C:\jython2.2.1\Lib\tkSnack.py", line 10, in ?
      File "c:\jython2.2.1\lib\lib-tk\Tkinter.py", line 8, in ?
      File "C:\jython2.2.1\Lib\_tkinter.py", line 4, in ?
    java.lang.UnsatisfiedLinkError: no tkinter in java.library.path
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
            at java.lang.Runtime.loadLibrary0(Runtime.java:823)
            at java.lang.System.loadLibrary(System.java:1030)
            at jTkinter.tkinter.<clinit>(tkinter.java:81)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:169)
            at org.python.core.SyspathJavaLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at org.python.core.Py.findClassEx(Unknown Source)
            at org.python.core.SysPackageManager.findClass(Unknown Source)
            at org.python.core.PackageManager.findClass(Unknown Source)
            at org.python.core.SysPackageManager.findClass(Unknown Source)
            at org.python.core.PyJavaPackage.__findattr__(Unknown Source)
            at org.python.core.imp.importFromAs(Unknown Source)
            at org.python.core.imp.importFrom(Unknown Source)
            at _tkinter$py.f$0(C:\jython2.2.1\Lib\_tkinter.py:4)
            at _tkinter$py.call_function(C:\jython2.2.1\Lib\_tkinter.py)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyCode.call(Unknown Source)
            at org.python.core.imp.createFromCode(Unknown Source)
            at org.python.core.imp.createFromPyClass(Unknown Source)
            at org.python.core.imp.loadFromSource(Unknown Source)
            at org.python.core.imp.find_module(Unknown Source)
            at org.python.core.imp.import_next(Unknown Source)
            at org.python.core.imp.import_name(Unknown Source)
            at org.python.core.imp.importName(Unknown Source)
            at org.python.core.ImportFunction.load(Unknown Source)
            at org.python.core.ImportFunction.__call__(Unknown Source)
            at org.python.core.PyObject.__call__(Unknown Source)
            at org.python.core.__builtin__.__import__(Unknown Source)
            at org.python.core.imp.importOne(Unknown Source)
            at Tkinter$py.f$0(c:\jython2.2.1\lib\lib-tk\Tkinter.py:8)
            at Tkinter$py.call_function(c:\jython2.2.1\lib\lib-tk\Tkinter.py)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyCode.call(Unknown Source)
            at org.python.core.imp.createFromCode(Unknown Source)
            at org.python.core.imp.createFromPyClass(Unknown Source)
            at org.python.core.imp.loadFromSource(Unknown Source)
            at org.python.core.imp.find_module(Unknown Source)
            at org.python.core.imp.import_next(Unknown Source)
            at org.python.core.imp.import_name(Unknown Source)
            at org.python.core.imp.importName(Unknown Source)
            at org.python.core.ImportFunction.load(Unknown Source)
            at org.python.core.ImportFunction.__call__(Unknown Source)
            at org.python.core.PyObject.__call__(Unknown Source)
            at org.python.core.__builtin__.__import__(Unknown Source)
            at org.python.core.imp.importOne(Unknown Source)
            at tkSnack$py.f$0(C:\jython2.2.1\Lib\tkSnack.py:10)
            at tkSnack$py.call_function(C:\jython2.2.1\Lib\tkSnack.py)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyCode.call(Unknown Source)
            at org.python.core.imp.createFromCode(Unknown Source)
            at org.python.core.imp.createFromPyClass(Unknown Source)
            at org.python.core.imp.loadFromSource(Unknown Source)
            at org.python.core.imp.find_module(Unknown Source)
            at org.python.core.imp.import_next(Unknown Source)
            at org.python.core.imp.import_name(Unknown Source)
            at org.python.core.imp.importName(Unknown Source)
            at org.python.core.ImportFunction.load(Unknown Source)
            at org.python.core.ImportFunction.__call__(Unknown Source)
            at org.python.core.PyObject.__call__(Unknown Source)
            at org.python.core.__builtin__.__import__(Unknown Source)
            at org.python.core.imp.importAll(Unknown Source)
            at org.python.pycode._pyx0.f$0(C:\Documents and Settings\gennaro\Desktop\script.py:1)
            at org.python.pycode._pyx0.call_function(C:\Documents and Settings\gennaro\Desktop\script.py)
            at org.python.core.PyTableCode.call(Unknown Source)
            at org.python.core.PyCode.call(Unknown Source)
            at org.python.core.Py.runCode(Unknown Source)
            at org.python.core.__builtin__.execfile_flags(Unknown Source)
            at org.python.util.PythonInterpreter.execfile(Unknown Source)
            at grafica.InterpeterJavaTcl.<init>(InterpeterJavaTcl.java:25)
            at grafica.ControllerAgSpit.actionPerformed(ControllerAgSpit.java:40)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
            at java.awt.Component.processMouseEvent(Component.java:6041)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5806)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4413)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4243)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2440)
            at java.awt.Component.dispatchEvent(Component.java:4243)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    
    java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: no tkinter in java.library.path
    Dov' è il problema?

  4. #4
    Non saprei. E' probabile che sia la versione di jTkinter ad essere troppo vecchia.
    Vedo dal sito che è aggiornata al 2000 e che funziona con Jython 1.1 mentre tu stai usando la 2.2.
    Rilasciata Python FTP Server library 0.5.1
    http://code.google.com/p/pyftpdlib/

    We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    313
    ma dove posso scaricarla la jpython-1.1?ho scaricato qualcosa ma c'è un .class e non so che fare?

  6. #6
    Guarda sul sito ufficiale:
    http://www.jython.org/
    Rilasciata Python FTP Server library 0.5.1
    http://code.google.com/p/pyftpdlib/

    We'll be those who'll make the italian folks know how difficult can be defecating in Southern California without having the crap flying all around the house.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.