Thread: Tkinter stinker

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

    Join Date
    Mar 2005
    Posts
    55
    Rep Power
    10

    Tkinter stinker


    Hi all,
    A general question when using tkinter: has anyone noticed problems with running tkinter in IDLE? My system is hanging a lot, so I'm running test programs in dos instead. Shouldn't I be able to work with tkinter just like I do python? Sometimes I get error messages from tkinter about calling (self*args), and then I'll run the code again and get no errors. Is there some sort of secret trick someone is willing to let me in on? I'm not going huge into tkinter, just the basics, but I can't even seem to get the basic functionality of it down. Input appreciated!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    236
    Rep Power
    12
    I strongly recommend looking into wxpython for GUI:
    http://www.wxpython.org/
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Isn't idle written in Tkinter? So if you are running Tkinker from from a Tkinter-application, there could be some conflicts (I don't really know this, I'm just guessing ).
    Instead of using idle, you could work in Python's interactive mode (Just type python on the command line). There should be no problems then.

    Regards, mawe

    Comments on this post

    • Grim Archon agrees : Yep, that is the solution.
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    618
    Rep Power
    65
    Dietrich says: I am using the PythonWin.exe IDE for my Tkinter code, works well.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Posts
    51
    Rep Power
    10

    String...


    Hello,
    Can anybody out there explain to me how to prompt a user to input a string a limited amount of time???
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Posts
    55
    Rep Power
    10

    one more time please!


    Hi! I like your suggestion because I need to stick with the simple things for this. But I'm not sure what you mean. I typed:
    python
    on the command line of both the python GUI(IDLE) and the DOS (command line) parts, but all I get is an NameError telling me python is not defined. Is there a step I'm missing? I'm good with python basics but I haven't expanded into the 'fancy' stuff yet. Please let me know!
    thanks!
    B.

    Originally Posted by mawe
    Hi!

    Isn't idle written in Tkinter? So if you are running Tkinker from from a Tkinter-application, there could be some conflicts (I don't really know this, I'm just guessing ).
    Instead of using idle, you could work in Python's interactive mode (Just type python on the command line). There should be no problems then.

    Regards, mawe
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Well, I don't really know how to do this on Windows because I only use Linux, but maybe you have to enter the whole path to the python executable, like
    Code:
    C:\path\to\python.exe
    Perhaps someone using Windows can help you better

    Regards, mawe
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2005
    Posts
    78
    Rep Power
    10
    Originally Posted by burninator
    Hi all,
    A general question when using tkinter: has anyone noticed problems with running tkinter in IDLE? My system is hanging a lot, so I'm running test programs in dos instead. Shouldn't I be able to work with tkinter just like I do python? Sometimes I get error messages from tkinter about calling (self*args), and then I'll run the code again and get no errors. Is there some sort of secret trick someone is willing to let me in on? I'm not going huge into tkinter, just the basics, but I can't even seem to get the basic functionality of it down. Input appreciated!
    By "hanging", do you mean hanging when the program terminates? If so, and you're using IDLE, you need to be calling root.quit(), etc. as clean up will not occur automatically.

    --OH.
  16. #9
  17. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Originally Posted by burninator
    Hi! I like your suggestion because I need to stick with the simple things for this. But I'm not sure what you mean. I typed:
    python
    In the Windows Start menu for Python2.x you should see an option to run Python (command line) .

    As Dietrich says using PythonWin as your IDE might be more user friendly for you. You get the PythonWin IDE when you install the WIN32 extension package.
    Pythonwin

    grim
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Location
    Bimingham,AL
    Posts
    68
    Rep Power
    11
    You might need to add path to python.exe to system path ( environ variable) . so that windows can find python program when you type python on command prompt


    Originally Posted by burninator
    Hi! I like your suggestion because I need to stick with the simple things for this. But I'm not sure what you mean. I typed:
    python
    on the command line of both the python GUI(IDLE) and the DOS (command line) parts, but all I get is an NameError telling me python is not defined. Is there a step I'm missing? I'm good with python basics but I haven't expanded into the 'fancy' stuff yet. Please let me know!
    thanks!
    B.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    88
    Rep Power
    11
    In command prompt type the following:
    Code:
    >>>cd python24
    >>>python
    And then, everything should be fine, if you installed python version 2.4.x to C:\
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Posts
    55
    Rep Power
    10

    Thanks!


    Thank you all,
    I greatly appreciate your help!

IMN logo majestic logo threadwatch logo seochat tools logo