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 3 3322 tk****@hotmail.com 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/showf...group_id=78018
Build 203 is the current version, build 204 is expected.
Colin W.
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 tk****@hotmail.com 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: stephan |
last post by:
Hi,
I have python 2.2.3 + pythonwin 156 on win2k.
The problem is that german chars like äöüÄÖÜß are not handled correctly.
Just create a test.py file with the content äöüÄÖÜß and edit it
with...
|
by: Martin Bless |
last post by:
IMHO PythonWin is great help in developing.
How can I do something like:
if detect("running on PythonWin"):
pass
# fake arguments ...
else:
"proceed normal"
|
by: Alberto Mantovani |
last post by:
hi,
how is it possible to run a python script in the pythonwin
environment from dos command line?
If I use the command "/run scriptname.py" and the pythonwin is already
opened I get error, so...
|
by: Jive |
last post by:
I've un-installed Python 2.4, re-installed Python 2.3 and PythonWin for 2.3,
but it's still broke.
When I start PythonWin, sometimes it looks like it is going to be okay. But
as soon as I open...
|
by: Chris P. |
last post by:
I've been having a problem with PythonWin that seemed to start
completely spontaneously and I don't even know where to START to find
the answer. The only thing I can think of that marks the point...
|
by: siggy2 |
last post by:
Hi All,
(sorry for my bad english)
I wrote a __tiny__ and __stupid__ recursive script directly into
pythonwin
interactive window with a time.sleep(1) and a print before each
recursion...
I...
|
by: accolades |
last post by:
Does anyone else have a problem with Pythonwin crashing after running a
python script with graphics libraries? Whenever I use Pythonwin to run
a PyGame or PyOgre script, Pythonwin crashes when the...
|
by: Dave Benjamin |
last post by:
Hey folks,
Why is PythonWin (win32all) still a separate download from a third party?
Is it legal, technical, or what? I think it's about time it be part of the
standard distribution.
There...
|
by: archaegeo |
last post by:
I am getting started in Python, and I have looked on both the
stackless page and python.org and cannot find the answer to what I
think is a simple problem.
If I start the python command line or...
|
by: sterling |
last post by:
I'm curious as to why the difference between IDLE and pythonWin when
using win32com.
opening an excel file, i've attempted to grab the chart information
out of the file.
commands like co =...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |