pythonw.exe

Discussion in 'Python' started by Ronald Reynolds, Aug 14, 2011.

  1. 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'
     
    Ronald Reynolds, Aug 14, 2011
    #1
    1. Advertising

  2. 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
     
    Irmen de Jong, Aug 14, 2011
    #2
    1. Advertising

  3. Ronald Reynolds

    Nobody Guest

    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.
     
    Nobody, Aug 14, 2011
    #3
  4. 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
     
    Chris Angelico, Aug 14, 2011
    #4
  5. * 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
     
    Thorsten Kampe, Aug 14, 2011
    #5
  6. Ronald Reynolds

    harrismh777 Guest

    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/harrismh777/gnulinux/gnulinux.htm
     
    harrismh777, Aug 14, 2011
    #6
  7. 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
     
    Chris Angelico, Aug 14, 2011
    #7
  8. Ronald Reynolds

    Seebs Guest

    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 /
    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.
     
    Seebs, Aug 14, 2011
    #8
  9. Ronald Reynolds

    Terry Reedy Guest

    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
     
    Terry Reedy, Aug 15, 2011
    #9
  10. 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/
     
    Dennis Lee Bieber, Aug 15, 2011
    #10
  11. On Mon, Aug 15, 2011 at 3:14 AM, Dennis Lee Bieber
    <> wrote:
    >        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 would say that DOS can, in a Windows context, mean either MS-DOS or
    a generic Disk Operating System. The latter sense is no more
    appropriate to the CLI than the former; in a modern OS, the part that
    truly "operates the disk" would be either the kernel or the hard disk
    driver, depending on your point of view, and neither of those has any
    sort of UI.

    >        What most call "DOS" is, to me, merely a "command line interpreter"
    > (CLI).


    And that's really what we have. A shell. A CLI. A textual command
    parser (as opposed to a graphical action system which is what most
    GUIs are). It's more similar to a MUD than to an operating system -
    first space-separated word is a verb, everything else is modifiers.

    ChrisA
     
    Chris Angelico, Aug 15, 2011
    #11
    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. Emile van Sebille

    python.exe vs pythonw.exe difference?

    Emile van Sebille, Mar 1, 2004, in forum: Python
    Replies:
    0
    Views:
    1,240
    Emile van Sebille
    Mar 1, 2004
  2. Tim Peters
    Replies:
    0
    Views:
    577
    Tim Peters
    Mar 2, 2004
  3. Thomas Heller

    Re: python.exe vs pythonw.exe difference?

    Thomas Heller, Mar 2, 2004, in forum: Python
    Replies:
    0
    Views:
    448
    Thomas Heller
    Mar 2, 2004
  4. Tim Peters
    Replies:
    1
    Views:
    6,531
    Bengt Richter
    Mar 3, 2004
  5. Thomas Heller

    Re: python.exe vs pythonw.exe difference?

    Thomas Heller, Mar 2, 2004, in forum: Python
    Replies:
    0
    Views:
    427
    Thomas Heller
    Mar 2, 2004
Loading...

Share This Page