Re: Jack Jansen - Question on Python Launcher
Barry Scott <[email protected]> Wed, 2 Jun 2021 19:26:58 +0100
| Newsgroups | gmane.comp.python.apple |
|---|---|
| Message-ID | <[email protected]> |
--===============7030501550076245075== Content-Type: multipart/alternative; boundary="Apple-Mail=_E03DB6BD-9E79-452C-9D02-32758B43BB83" --Apple-Mail=_E03DB6BD-9E79-452C-9D02-32758B43BB83 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 30 May 2021, at 18:30, Guy DeStefano <[email protected]> = wrote: >=20 >=20 > Sorry to bother you, but I have one question that I cannot find an = answer to, could you please help. Am very new to Python3 and have = written a small program that is my base for my learning Python3. All is = perfect except, when I double click my program the .py file, it works = great except that it calls in the Python Launcher, and when I exit my = program, the preferences box for Python Launcher and the Icon of the = launcher still remain on the screen. I have to manually close the = python launcher. Can this be done programmatically, I exit with = sys.exit(0). I am using tkinter in the program, along with python3.9.5, = on an Apple Mac computer. This may not be the proper place for this = question, if not, I apologize and please direct me where to go as I have = been googling for days. Thanks in advance. Any help will be greatly = appreciated. > I have just noticed that python3 -V states python 3.9.5, and looking = at the python launcher box it states Version 3.10.0b1(3.10.0b1) Is this = something I am doing wrong. I cannot duplicate what you are doing. I have Xcode installed so when I double click a .py file it ends up in = the Xcode editor. Unless you have written a GUI app then your python program is expecting = to be run from a Terminal window. I'm guessing what what you are seeing is that the python launcher is = running your program and keeping the window open so that you can read what it printed. Often new users complain that the Window flash and vanishes before they = can read the output. This behaviours looks to be the solution to that common problem. Barry >=20 > [email protected] <mailto:[email protected]> > Guy DeStefano > _______________________________________________ > Pythonmac-SIG maillist - [email protected] > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --Apple-Mail=_E03DB6BD-9E79-452C-9D02-32758B43BB83 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On 30 May 2021, at 18:30, Guy DeStefano <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = class=3D""><div class=3D""><div dir=3D"ltr" class=3D"gmail_signature" = data-smartmail=3D"gmail_signature"><div dir=3D"ltr" class=3D""><br = class=3D"">Sorry to bother you, but I have one question that I cannot = find an answer to, could you please help. Am very new to Python3 = and have written a small program that is my base for my learning = Python3. All is perfect except, when I double click my = program the .py file, it works great except that it calls in the Python = Launcher, and when I exit my program, the preferences box for Python = Launcher and the Icon of the launcher still remain on the screen. = I have to manually close the python launcher. Can this be done = programmatically, I exit with sys.exit(0). I am using tkinter in the = program, along with python3.9.5, on an Apple Mac computer. This = may not be the proper place for this question, if not, I apologize and = please direct me where to go as I have been googling for days. Thanks in = advance. Any help will be greatly appreciated.<br class=3D"">I have just = noticed that python3 -V states python 3.9.5, and looking at the python = launcher box it states Version 3.10.0b1(3.10.0b1) Is this something I am = doing wrong.</div></div></div></div></div></blockquote><div><br = class=3D""></div><div>I cannot duplicate what you are = doing.</div><div><br class=3D""></div><div>I have Xcode installed so = when I double click a .py file it ends up in the Xcode = editor.</div><div><br class=3D""></div><div>Unless you have written a = GUI app then your python program is expecting to be run from a Terminal = window.</div><div><br class=3D""></div><div>I'm guessing what what you = are seeing is that the python launcher is running your program and = keeping the window</div><div>open so that you can read what it = printed.</div><div><br class=3D""></div><div>Often new users complain = that the Window flash and vanishes before they can read the = output.</div><div>This behaviours looks to be the solution to that = common problem.</div><div><br class=3D""></div><div>Barry</div><div><br = class=3D""></div><blockquote type=3D"cite" class=3D""><div class=3D""><div= dir=3D"ltr" class=3D""><div class=3D""><div dir=3D"ltr" = class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div = dir=3D"ltr" class=3D""><br class=3D""><a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br class=3D"">Guy = DeStefano</div></div></div></div> _______________________________________________<br = class=3D"">Pythonmac-SIG maillist - <a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br class=3D""><a = href=3D"https://mail.python.org/mailman/listinfo/pythonmac-sig" = class=3D"">https://mail.python.org/mailman/listinfo/pythonmac-sig</a><br = class=3D"">unsubscribe: = https://mail.python.org/mailman/options/Pythonmac-SIG<br = class=3D""></div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_E03DB6BD-9E79-452C-9D02-32758B43BB83-- --===============7030501550076245075== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pythonmac-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --===============7030501550076245075==--