473,566 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PythonWin

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

Jul 18 '05 #1
3 3332
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.
Jul 18 '05 #2
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
Jul 18 '05 #3
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.Creat eFileDialog(1, None, "*.txt", 0, 'Text Files|||')
x=f.SetOFNIniti alDir("C:\\")
f.SetOFNTitle(" Open Text File")
result=f.DoModa l()
if result == win32con.IDCANC EL: sys.exit()
print "path selected=", f.GetPathName()
print "Filename selected=", f.GetFileName()
Hope it helps.

-Larry Bates
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1231
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 pythonwin. In the editor you will see only äöüÄ . I had the problem in the past, wrote it to mark and he fixed it.
7
3007
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"
3
2932
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 someone can help me? thanks Alberto
14
2876
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 a .py file, the interactive window grabs the focus and will not let go. I am stumped. Is there something PythonWin uses that I could try...
4
2600
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 between "PythonWin works fine" and "PythonWin hardly every works fine" was that I changed the size of my Virtual Paging file, noticing that it was...
2
7301
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 should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the...
2
2458
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 script exits. I know it's probably because the Pythonwin interpreter can't read from the console once the graphics mode has been changed, but has...
17
1941
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 are many useful things that you ought to be able to do without downloading third-party libraries. Terminating a process, for example. Communicating...
3
2970
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 idle, i can If I start pythonwin I get the following error ....No Module named Stackless Any help?
4
3603
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 = ChartObjects(1) works in pythonWin but doesn't work in IDLE. however, on both co = chartobjects(1) works just fine.
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.