Socket programming help

Discussion in 'Mac Programming' started by tunasushi, Jan 29, 2012.

  1. macrumors newbie

    Joined:
    Sep 5, 2011
    #1
    I have a command line python script that does some socket programming I need to do. I don't know that much about python, but I know how object-oriented programming works and the basics of it. My question is, what is the simplest way to make a gui for the program. I just need to have a text box and a send button. If I could get a pointer to some bits of code or programs, that would really help. I don't care at all if the program is written in python, C++ would be better in fact, I just need it to do a simple task with a simple GUI. Thanks!
     
  2. macrumors 6502

    Joined:
    Mar 12, 2010
    #2
    You don't want socket help, you want gui help. You'll get better answers if the topic reflects what you really want to know.
     
  3. thread starter macrumors newbie

    Joined:
    Sep 5, 2011
    #3
    Thanks for the info, so I will rephrase my question: Does anyone know what is the easiest/best way to create a GUI for python? Thanks.
     
  4. jiminaus, Jan 29, 2012
    Last edited: Jan 29, 2012

    macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Python's "standard" GUI library is TkInter. tkSimpleDialog's askstring should be able to do what you want it to.

    For example:
    Code:
    from Tkinter import Tk
    from tkSimpleDialog import askstring
    root = Tk()
    root.withdraw()
    result = askstring('askstring test', 'Enter something here:')
    if result != None:
    	print result
    
     
  5. thread starter macrumors newbie

    Joined:
    Sep 5, 2011
    #5
    Thanks jiminaus! As I explained before, I am not fluent in Python, but can work with it if given code. This really helped me!
     

Share This Page