Hi Arra,

Glad you like the idea for a work around.

Yes it is public & documented at 
https://pyinstaller.org/en/stable/runtime-information.html and yes there are 
several other goodies in there from what I read, e.g.:

  *   An explanation about what happens to __file__ when you are running from 
the build executable
  *   How to get to bundled (non-python) files
  *   The difference between sys.executable and sys.argv[0]
  *   Potential issues with LD_LIBRARY_PATH when you are calling external 
python programs and how to fix them

Well worth a read. I also think that you might like reading 
https://pyinstaller.org/en/stable/when-things-go-wrong.html#build-time-dependency-graph
 amongst others.

All the best,
Steve

From: [email protected] <[email protected]> On Behalf Of 
Arra Avakian
Sent: Monday, September 4, 2023 3:32 PM
To: PyInstaller <[email protected]>
Subject: Re: [PyInstaller] pyinstaller is great

Yes, it helps! Thank you Steve, that is a clever work around. I am happy with 
it, as I can proceed past this hiccup just fine.
Curiousity prompts me to ask: is the 'frozen' sys attribute public, e.g. 
documented in the pyinstaller documentation?
Any other goodies in there?
Arra
On Monday, September 4, 2023 at 4:04:12 AM UTC-4 Steve Barnes wrote:
Hi Arra,


Just a suggestion as a work around you could modify your “if __debug__” cases 
to read “if __debug__ and not getattr(sys, 'frozen', False) “ this would 
disable the debug on your built executables for you. See 
https://pyinstaller.org/en/stable/runtime-information.html for more.



Hope that helps,

Steve Barnes

From: [email protected] <[email protected]> On Behalf Of Arra 
Avakian
Sent: Sunday, September 3, 2023 10:45 PM
To: [email protected]
Subject: [PyInstaller] pyinstaller is great

Dear pyinstaller team,

I have used pyinstaller to create executables on both Windows and MacOS.
I have written a complex GUI using wxPython and pyinstaller does an amazing job!
Congratulations for designing, building, and maintaining this complex tool.
(I need to separately congratulate the wxPython team as well. My app uses 
background threading so that the GUI user can cancel any long running activity.)

I am a programmer who retired after a 50+ year career that started in 1967!
I first learned about programming in assembly and Fortran II on an IBM 1620.

I tried using "if __debug__" in my code and found I could suppress affected 
code using the python option -O (optimization). I found that pyinstaller did 
not complain about incorrect options when I added "--python-option=-O". But it 
looks like the python interpreter was run without that switch. When I run my 
python script using the -O switch, I can see that my program is skipping over 
the debug dependent code.

So I am guessing there might be a deeper reason that this particular python 
option is not supported by pyinstaller. If it becomes available in the future, 
I would love to hear about it!

Thanks again,
Arra Avakian
--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CAM_S47RFx70RrRNvNvKv47sC5zra2zeyc0nAD6-JH1Jg5F-K-Q%40mail.gmail.com<https://groups.google.com/d/msgid/pyinstaller/CAM_S47RFx70RrRNvNvKv47sC5zra2zeyc0nAD6-JH1Jg5F-K-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/b57cffde-d094-4807-a39b-caf32683dcc7n%40googlegroups.com<https://groups.google.com/d/msgid/pyinstaller/b57cffde-d094-4807-a39b-caf32683dcc7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/DU0P194MB18190FBE9CA0841FA6F49A9B9BE9A%40DU0P194MB1819.EURP194.PROD.OUTLOOK.COM.

Reply via email to