[Tutor] Two questions on MS-DOS

Gregory Tucker tuckerg@acm.org
Sat, 13 Jan 2001 23:44:22 +0900


Hi,

I think it would be cleaner to wrap the python script in a DOS batch. You
can use the pause command in the batch file, without touching the Python.

I believe your other question was answered already. And I just learned that
answer as well.

Regards,
Greg


---
  Gregory Tucker
  Tokyo, Japan
  mailto:tuckerg@acm.org

  These opinions are my own.



> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Kalle Svensson
> Sent: Saturday, January 13, 2001 10:02 AM
> To: Fabrizio
> Cc: tutor@python.org
> Subject: Re: [Tutor] Two questions on MS-DOS
>
>
> Sez Fabrizio:
> > 1 - How can I keep my DOS shell from closing automatically upon
> the end of a
> > Python scipt ? (It does not give time to read the parser exceptions and
> > errors messages !)
>
> Oh, I wish I knew...  The best I've come up with is either run the program
> from a DOS window you've opened "manually", or put a line like
>
> raw_input("Press enter...")
>
> at the end of your program.  Both are bad, but I don't know a better way.
>
> > 2 - How can I keep the DOS shell from opening up upon the start
> of a Python
> > script ? (I need this when using TKInter, and I do not want to
> see the DOS
> > window under TKInter's).
>
> Rename the file with a .pyw extension.  .pyw's use pythonw.exe to launch,
> which is the same as python.exe but without the DOS window.
>
> HTH,
>   Kalle
> --
> Email: kalle@gnupung.net     | You can tune a filesystem, but you
> Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
> PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
>