#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Somewhere over the Rainbow
    Posts
    128
    Rep Power
    12

    Trueble with tkinterGui


    Hi, I trying to run this code http://www.metaslash.com/brochure/tutorial/filegui.py but when I type:

    python filegui.py

    Traceback (most recent call last):
    File "GUI.py", line 16, in ?
    import tkinterGui
    ImportError: No module named tkinterGui

    What could be the problem? where can I download tkinterGui?

    Thanks A lot.
    Last edited by Gerardoj; September 26th, 2003 at 11:47 PM.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I looked on PyPI and couldn't find anything, i also did a search on google.. think your best bet would be to download the Tk add-on lib's, their are a whole buncha links on that site you linked too

    http://www.metaslash.com/brochure/tutorial/

    Happy Pying,
    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Somewhere over the Rainbow
    Posts
    128
    Rep Power
    12
    Hey thanks for the reply, I downloaded the TCL 8.4.4 here http://prdownloads.sourceforge.net/t..._mirror=heanet and I installed, but again I type:

    python filegui.py

    Traceback (most recent call last):
    File "GUI.py", line 16, in ?
    import tkinterGui
    ImportError: No module named tkinterGui

    What could be the problem?
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    # import a local module we created for Tkinter GUI convenience functions
    import tkinterGui
    You need to save this file to the same location as filegui.py , it should work fine then!

    You might also wana check out http://tix.sourceforge.net/ for more Tk widgets.

    Mark
    programming language development: www.netytan.com Hula

  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    France
    Posts
    53
    Rep Power
    15
    Hi,

    if you still have a problem with importing your module, you can try one of the two following solutions :

    at the first line of your script, type :

    Code:
    import sys
    sys.path.append("......")
    where ...... stands for the path of your module file.


    Otherwise, you can add the path of your module file to the PYTHONPATH environment variable.

    In fact, you may have an import error because python does not search for your module in the correct path.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Somewhere over the Rainbow
    Posts
    128
    Rep Power
    12
    Thanks a lot. Now is working fine

IMN logo majestic logo threadwatch logo seochat tools logo