Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pythonw.exe

Reply
Thread Tools

pythonw.exe

 
 
Ronald Reynolds
Guest
Posts: n/a
 
      08-14-2011
Dear Python Friends:
in my python directory there is a python.exe file which I understand completely but there is also a pythonw.exe DOS seems to honor the pythonw
command (No error message) but nothing happens. What is pythonw.exe?
Also is there a way to invoke idle from the DOS prompt? I tried idle filename.py and just idle. Is there any .exe for idle?

Sincerely, 'Ron "bumpker" Reynolds'
 
Reply With Quote
 
 
 
 
Irmen de Jong
Guest
Posts: n/a
 
      08-14-2011
On 14-8-2011 15:23, Ronald Reynolds wrote:
> Dear Python Friends:
> in my python directory there is a python.exe file which I understand completely but there is also a pythonw.exe DOS seems to honor the pythonw
> command (No error message) but nothing happens. What is pythonw.exe?
> Also is there a way to invoke idle from the DOS prompt? I tried idle filename.py and just idle. Is there any .exe for idle?
>
> Sincerely, 'Ron "bumpker" Reynolds'


pythonw.exe is the same as python.exe but it doesn't open a console window, and launches
python in the background. This allows you to easily run background programs or GUI
programs in a nicer way (without a dummy console window popping up).

Idle has no .exe as far as I know but you can start it like this:

pythonw -m idlelib.idle

You could create an alias or batch file called 'idle' that does this.

Irmen
 
Reply With Quote
 
 
 
 
Nobody
Guest
Posts: n/a
 
      08-14-2011
On Sun, 14 Aug 2011 06:23:45 -0700, Ronald Reynolds wrote:

> in my python directory there is a python.exe file which I understand
> completely but there is also a pythonw.exe DOS seems to honor the pythonw
> command (No error message) but nothing happens. What is pythonw.exe?


Windows distinguishes between "console" and "GUI" executables. python.exe
is a console executable, pythonw.exe is a GUI executable. One difference
is that GUI executables don't have stdin/stdout/stderr, so you can't use
pythonw.exe as an interactive interpreter.

The main use for pythonw.exe is if you write a GUI program in Python
(using e.g. TkInter, wxPython, etc) and you want it to be able to run it
from an icon (desktop, start menu) without it opening a console window
(running a console executable from an icon will open a console window).

> Also
> is there a way to invoke idle from the DOS prompt? I tried idle
> filename.py and just idle. Is there any .exe for idle?


"C:\Program Files (x86)\Python27\Lib\idlelib\idle.py" filename.py

.... or similar, depending upon where Python is installed.

BTW, unless you're using Windows 95/98/ME, you don't have a
"DOS Prompt". The command prompt in Windows NT/2000/XP/Vista/7 isn't DOS.

 
Reply With Quote
 
Chris Angelico
Guest
Posts: n/a
 
      08-14-2011
On Sun, Aug 14, 2011 at 3:30 PM, Nobody <> wrote:
> BTW, unless you're using Windows 95/98/ME, you don't have a
> "DOS Prompt". The command prompt in Windows NT/2000/XP/Vista/7 isn't DOS.
>


I don't see this as any sloppier than referring to "opening a
<whatever> prompt" when you mean "opening up a windowed command
interpreter". The command interpreter in NT+ uses an interface that
derives from the original DOS command interpreter, and a lot of people
consider it to be as primitive (not realising that it has a lot of
features, eg tab completion, that are WAY better even than
command+doskey); it's a lot closer to Unix's bash than to MS-DOS's
command. (I do prefer bash, though.)

ChrisA
 
Reply With Quote
 
Thorsten Kampe
Guest
Posts: n/a
 
      08-14-2011
* Chris Angelico (Sun, 14 Aug 2011 16:52:05 +0100)
> On Sun, Aug 14, 2011 at 3:30 PM, Nobody <> wrote:
> > BTW, unless you're using Windows 95/98/ME, you don't have a "DOS
> > Prompt". The command prompt in Windows NT/2000/XP/Vista/7 isn't DOS.

>
> I don't see this as any sloppier than referring to "opening a
> <whatever> prompt" when you mean "opening up a windowed command
> interpreter".


You're misunderstanding what people mean by "DOS prompt". They don't
mean "this is the DOS command shell", they mean "this is DOS".

Thorsten
 
Reply With Quote
 
harrismh777
Guest
Posts: n/a
 
      08-14-2011
Thorsten Kampe wrote:
> You're misunderstanding what people mean by "DOS prompt". They don't
> mean "this is the DOS command shell", they mean "this is DOS".


.... yup, ... was helping my little sis with her iMac over the phone from
four states away and had her open a terminal for some magic... and it
took her exactly 1.03 seconds to say, "Oh, the iMac has DOS installed in
the utilities folder!" :-O

.... blondes... :-}


(she tries hard, and actually has been learning, so, we keep trying...)







--
m harris

FSF ...free as in freedom/
http://webpages.charter.net/harrismh...x/gnulinux.htm
 
Reply With Quote
 
Chris Angelico
Guest
Posts: n/a
 
      08-14-2011
On Sun, Aug 14, 2011 at 9:20 PM, harrismh777 <> wrote:
> ... yup, ... was helping my little sis with her iMac over the phone from
> four states away and had her open a terminal for some *magic... and it took
> her exactly 1.03 seconds to say, "Oh, the iMac has DOS installed in the
> utilities folder!" * :-O
>
> ... blondes... * :-}


Just to confuse things even further, it's not unlikely that a Mac or
Linux or Windows computer will have DOSBox installed. Is *that* DOS?
Technically no, but practically yes.

ChrisA
 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      08-14-2011
On 2011-08-14, Chris Angelico <> wrote:
> Just to confuse things even further, it's not unlikely that a Mac or
> Linux or Windows computer will have DOSBox installed. Is *that* DOS?
> Technically no, but practically yes.


Depending on how you define "unlikely", I'd guess it is.

Assume that "unlikely" means roughly the equivalent of "if I were optimizing,
I'd use a compiler branch prediction hint at this point".

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
Terry Reedy
Guest
Posts: n/a
 
      08-15-2011
On 8/14/2011 10:30 AM, Nobody wrote:

> The main use for pythonw.exe is if you write a GUI program in Python
> (using e.g. TkInter, wxPython, etc) and you want it to be able to run it
> from an icon (desktop, start menu) without it opening a console window
> (running a console executable from an icon will open a console window).


In particular, IDLE runs in a pythonw process and it executes user code
in a separate pythonw process and usually uses a socket for the connection.

--
Terry Jan Reedy

 
Reply With Quote
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      08-15-2011
On Sun, 14 Aug 2011 21:28:23 +0100, Chris Angelico <>
declaimed the following in gmane.comp.python.general:

> On Sun, Aug 14, 2011 at 9:20 PM, harrismh777 <> wrote:
> > ... yup, ... was helping my little sis with her iMac over the phone from
> > four states away and had her open a terminal for some *magic... and it took
> > her exactly 1.03 seconds to say, "Oh, the iMac has DOS installed in the
> > utilities folder!" * :-O
> >
> > ... blondes... * :-}

>
> Just to confuse things even further, it's not unlikely that a Mac or
> Linux or Windows computer will have DOSBox installed. Is *that* DOS?
> Technically no, but practically yes.
>

Depends... "DOS", to me, is just short for "Disk Operating
System"... I've source code (in a book) for K2FDOS, source code for
LS-DOS 6, and have used the AmigaDOS component of AmigaOS (granted --
AmigaDOS technically was the part of the OS that gave access to the I/O
system, and included the command line interpreter...).

"DOS" does not automatically mean "MicroSoft DOS"...

I have less experience with "MS-DOS" than I have with LS-DOS and
AmigaDOS.

What most call "DOS" is, to me, merely a "command line interpreter"
(CLI).
--
Wulfraed Dennis Lee Bieber AF6VN
HTTP://wlfraed.home.netcom.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57