Can I create an imput box with python in windows?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zensunni
    New Member
    • May 2007
    • 101

    Can I create an imput box with python in windows?

    I'm looking to create a window with python to accept a typed value. Is there any fairly easy way to do this?
  • zensunni
    New Member
    • May 2007
    • 101

    #2
    Does anyone know of a way, or does such a thing not exist?

    Comment

    • Smygis
      New Member
      • Jun 2007
      • 126

      #3
      EasyGUI?

      And here is 20 characters.

      Comment

      • dshimer
        Recognized Expert New Member
        • Dec 2006
        • 136

        #4
        Originally posted by zensunni
        I'm looking to create a window with python to accept a typed value. Is there any fairly easy way to do this?
        I found an extremely simple pure win32 file open dialog and have been looking for a long time for something similar for data input, but to no avail. I sure would love to see one though.
        Code:
        import win32ui,win32con,sys
        fd = win32ui.CreateFileDialog(1,None,None,win32con.OFN_ALLOWMULTISELECT,'All Files|*.*')
        fd.SetOFNInitialDir('c:\\tmp')
        fd.SetOFNTitle('Select multiple files')
        if fd.DoModal() == win32con.IDCANCEL:sys.exit(1)
        print fd.GetPathNames()
        The code is slightly corrupt in that there is no space after OFN_ though one appears in the message editor.

        Comment

        Working...