PythonWin

Discussion in 'Python' started by tkpmep@hotmail.com, Mar 12, 2005.

  1. Guest

    I have a Python program that collects user input using

    msg = "Enter the full path and name of the file to be processed: "
    answer = raw_input(msg)

    If I run it in IDLE, the question is splashed across the execution
    window, and if it is long, simply wraps to the next line. Most
    importantly, it is intelligible, because I see the entire message. I
    enter my answer on the next line, and once again, I can see the entire
    path and file name, even if it is longer than long.

    However, if I run it in ActivePython's PythonWin, a small message box
    pops up, with hardly any space to diplay msg and a smallish space into
    which I can type my answer. How can I force PythonWin to get its input
    from the execution window or to enlarge its message box sufficiently to
    display the entire question?

    Thomas Philips
     
    , Mar 12, 2005
    #1
    1. Advertising

  2. wrote:
    > I have a Python program that collects user input using
    >
    > msg = "Enter the full path and name of the file to be processed: "
    > answer = raw_input(msg)
    >
    > If I run it in IDLE, the question is splashed across the execution
    > window, and if it is long, simply wraps to the next line. Most
    > importantly, it is intelligible, because I see the entire message. I
    > enter my answer on the next line, and once again, I can see the entire
    > path and file name, even if it is longer than long.
    >
    > However, if I run it in ActivePython's PythonWin, a small message box
    > pops up, with hardly any space to diplay msg and a smallish space into
    > which I can type my answer. How can I force PythonWin to get its input
    > from the execution window or to enlarge its message box sufficiently to
    > display the entire question?
    >
    > Thomas Philips
    >

    You might try out the PythonWin from:
    http://sourceforge.net/project/showfiles.php?group_id=78018

    Build 203 is the current version, build 204 is expected.

    Colin W.
     
    Colin J. Williams, Mar 12, 2005
    #2
    1. Advertising

  3. Neil Hodgson Guest

    Thomas Philips:

    > However, if I run it in ActivePython's PythonWin, a small message
    > box pops up, with hardly any space to diplay msg and a smallish
    > space into which I can type my answer. How can I force PythonWin
    > to get its input from the execution window


    You will have to implement the feature which looks to me like much
    work which is why it wasn't done that way by default.

    > or to enlarge its message box sufficiently to display the entire
    > question?


    The dialog is included as a binary resource in a DLL, win32ui.pyd.
    You could get the source code, change the dialog resource and recompile
    PythonWin. Another approach would be to manipulate the dialog and
    control sizes after creation in pythonwin/pywin/mfc/dialog.py
    GetSimpleInput().

    Neil
     
    Neil Hodgson, Mar 12, 2005
    #3
  4. Larry Bates Guest

    wrote:
    > I have a Python program that collects user input using
    >
    > msg = "Enter the full path and name of the file to be processed: "
    > answer = raw_input(msg)
    >
    > If I run it in IDLE, the question is splashed across the execution
    > window, and if it is long, simply wraps to the next line. Most
    > importantly, it is intelligible, because I see the entire message. I
    > enter my answer on the next line, and once again, I can see the entire
    > path and file name, even if it is longer than long.
    >
    > However, if I run it in ActivePython's PythonWin, a small message box
    > pops up, with hardly any space to diplay msg and a smallish space into
    > which I can type my answer. How can I force PythonWin to get its input
    > from the execution window or to enlarge its message box sufficiently to
    > display the entire question?
    >
    > Thomas Philips
    >

    Take a look at the following sample program. It will allow you to
    browse to the file that you want to open.

    import win32ui
    import sys
    f=win32ui.CreateFileDialog(1, None, "*.txt", 0, 'Text Files|||')
    x=f.SetOFNInitialDir("C:\\")
    f.SetOFNTitle("Open Text File")
    result=f.DoModal()
    if result == win32con.IDCANCEL: sys.exit()
    print "path selected=", f.GetPathName()
    print "Filename selected=", f.GetFileName()


    Hope it helps.

    -Larry Bates
     
    Larry Bates, Mar 14, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilariu Raducan

    PythonWin dynamic toolbar

    Ilariu Raducan, Jul 7, 2003, in forum: Python
    Replies:
    0
    Views:
    332
    Ilariu Raducan
    Jul 7, 2003
  2. Richard Lee
    Replies:
    2
    Views:
    461
    Daniel Dittmar
    Jul 22, 2003
  3. Adam
    Replies:
    0
    Views:
    348
  4. stephan
    Replies:
    0
    Views:
    459
    stephan
    Jul 30, 2003
  5. Martin Bless

    Detect PythonWin?

    Martin Bless, Aug 1, 2003, in forum: Python
    Replies:
    7
    Views:
    374
    Roger Upole
    Aug 2, 2003
Loading...

Share This Page