Deutsch English Français Italiano |
<mailman.35.1725480605.2917.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!uucp.uio.no!fnord.no!news1.firedrake.org!fu-berlin.de!uni-berlin.de!not-for-mail From: Barry Scott <barry@barrys-emacs.org> Newsgroups: comp.lang.python Subject: Re: Crash when launching python Date: Wed, 4 Sep 2024 20:48:21 +0100 Lines: 37 Message-ID: <mailman.35.1725480605.2917.python-list@python.org> References: <CAASeUHqhP-TKjWkNqb_2o59a6hH6BRYa_kuNZn-gZ3wzC45NXQ@mail.gmail.com> <C9833F78-4583-45F1-A7D6-7D450D4963DB@barrys-emacs.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de Xgdg/jtdXx6uFr8afAHn8gEz2xdhkamu/J/cV8QonZMA== Cancel-Lock: sha1:AuSv6Ki1yggI9s8o73c53y2op6M= sha256:gnESYOVss0T92AGz3ozbQjvi4MrgVQ8k5Owk0Xt1NCM= Return-Path: <barry@barrys-emacs.org> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:python': 0.06; 'debug': 0.07; 'debugging': 0.07; 'subject:when': 0.07; 'cc:addr :python-list': 0.09; 'console,': 0.09; 'from:addr:barry': 0.09; 'received:217.70': 0.09; 'received:217.70.178': 0.09; 'received:gandi.net': 0.09; 'received:mail.gandi.net': 0.09; 'terminal': 0.09; 'cc:no real name:2**0': 0.14; '"show': 0.16; 'barry': 0.16; 'can:': 0.16; 'from:addr:barrys-emacs.org': 0.16; 'from:name:barry scott': 0.16; 'message-id:@barrys-emacs.org': 0.16; 'option.': 0.16; 'stdout': 0.16; 'tracebacks': 0.16; 'useful.': 0.16; 'wrote:<span': 0.16; 'wrote:': 0.16; 'python': 0.16; 'cc:addr:python.org': 0.20; 'version': 0.23; 'code': 0.23; 'cannot': 0.25; 'cc:2**0': 0.25; 'email addr:python.org>': 0.28; 'assume': 0.32; 'python-list': 0.32; 'sep': 0.32; '0);': 0.33; 'rgb(0,': 0.33; 'package': 0.34; 'header:In-Reply-To:1': 0.34; 'files': 0.36; 'display': 0.36; 'main': 0.37; 'using': 0.37; 'edit': 0.39; 'use': 0.39; 'font-family:': 0.60; 'inline': 0.61; 'skip:h 10': 0.61; 'display:': 0.62; 'none;': 0.62; 'font- weight:': 0.62; '0px;': 0.63; 'your': 0.64; 'text-indent:': 0.64; 'look': 0.65; 'normal;': 0.66; 'received:217': 0.67; 'skip:! 10': 0.67; 'float:': 0.74; 'email name:<python-list': 0.84; 'happened.': 0.84; 'right-click': 0.84; '400;': 0.89; '13px;': 0.91; 'none;">': 0.91 In-Reply-To: <CAASeUHqhP-TKjWkNqb_2o59a6hH6BRYa_kuNZn-gZ3wzC45NXQ@mail.gmail.com> X-Mailer: Apple Mail (2.3776.700.51) X-GND-Sasl: barry@barrys-emacs.org X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <C9833F78-4583-45F1-A7D6-7D450D4963DB@barrys-emacs.org> X-Mailman-Original-References: <CAASeUHqhP-TKjWkNqb_2o59a6hH6BRYa_kuNZn-gZ3wzC45NXQ@mail.gmail.com> Bytes: 4572 > On 4 Sep 2024, at 16:27, Guenther Sohler via Python-list = <python-list@python.org> wrote: >=20 > Is it possible to turn on debugging and to display on the console, = where > python is loading files from ? >=20 I assume you have a .app that is then packaged into a .dmg. It will be the .app that you need to either build with a debug version = of your code or after building the .app edit the debug code into it. Do you know that .app files are a tree of files? You can right-click on an .app in Finder and it will have a "Show = Package Context" option. Or using the terminal and you can: cd <appname>.app/Contents then have a look around. Beware that you cannot use print to stdout for a .app as its = stdin/stdout do not go anywhere useful. What I do is use code like this in the main function: sys.stdout =3D open( '/home/barry/debug.log', 'w', 1 ) sys.stderr =3D sys.stdout=20 Now you can use print(); look in the debug.log to see what happened. Also any tracebacks will end up in the debug.log. Barry