[Tutor] Two questions on MS-DOS

Kalle Svensson kalle@gnupung.net
Sat, 13 Jan 2001 02:02:00 +0100


--MIdTMoZhcV1D07fI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sez Fabrizio:
> 1 - How can I keep my DOS shell from closing automatically upon the end o=
f 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 Pyth=
on
> 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
--=20
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

--MIdTMoZhcV1D07fI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6X6kIdNeA1787sd0RAvJMAJ9ezgqU61jX2LH0d5rrrAv53w28YwCgxoKG
Dffjmkc4xaLzGhstvVFgOzs=
=jpmK
-----END PGP SIGNATURE-----

--MIdTMoZhcV1D07fI--