thank you for your message!! the main reason is not having the program be
an unweildy mess. The user interacts with variables that are used on
completely different pages, and it's just easier to compile them into
different scripts rather than one huge file.

My main problem was that this is the general assumption about python app
architecture? TK also is built around the idea that there should only be
one window. however I was trying to use the app to spit out tkinter error
messages whenever there was a user error. My main problem was not really
with pyinstaller but with not using Toplevel() as opposed to new instances
of tkinter. One of those gotchas.....

In a similar way pyinstaller I guess assumes that you'll have one file?
Maybe I'm just a newb but I love modularity.

So, after I figured out I had to add all of these individual files or
directories via the spec file, I can definitely compile it all under one
bundle, which will go different places depending on which scripts are
activated. Took me a bit but now it's more of a package app rather than a
single use tool. I like your idea on sharing libraries between apps though,
I will investigate!!

thank you again for being kind and sharing ur thoughts!

On Mon, Feb 17, 2020, 4:16 PM 'Chris Barker' via PyInstaller <
[email protected]> wrote:

> I think you need to rethink a bit what you are doing here:
>
> You are calling a python program from within a python program? Why? Do you
> need two programs running?
>
> If you do have a good reason, then you need to rethink how you are using
> PyInstaller (and maybe it's not the right tool).
>
> PyInstaller is designed to make ONE single application out of a pile of
> Python code. It sounds like you need two (or more?) applications. In which
> case, I think there are ways to make multiple top level programs that share
> the same libs, etc. Do a little googling, I can't find it at the moment,
> but it is possible, if not well tested.
>
> -CHB
>
>
>
>
>
>
> On Mon, Feb 17, 2020 at 12:29 AM JAY JAY <[email protected]> wrote:
>
>> Yeah soo.. I figured out my problem. BONKERS.
>>
>> Turns out I was using this:
>>
>> subprocess.call([sys.executable,"file"])
>>
>> AAAND.. if you run the python script without pyinstaller, sys.executable = 
>> the python interpreter. In a bundled pyinstaller app, that's NOT WHAT IT 
>> IS!!! It's actually the executable file itself. So, I was inadvertently 
>> running the app over and over. I tell you.. that is just nuts. Seriously 
>> programmers?
>>
>> So, I had to figure out another way to execute my py file inside my py 
>> script. Easy right? Ok, but I needed an argument.. so exec(open(read()) 
>> wouldn't work.. or would it? Apparently this does:
>>
>> sys.argv = ["file.py"), vArguments]
>> exec(open(os.path.join(wd,"tests","errorMessage.py")).read(), globals())
>>
>> Please note that I also included "globals()" there, because apparently exec 
>> won't include any imports unless you do that. WTF? I'm... ambivalent about 
>> Python at the moment. What are all these gotchas??
>>
>>
>> On Sunday, 16 February 2020 16:23:18 UTC-6, JAY JAY wrote:
>>>
>>> I have an app like this
>>>
>>> Main.py (includes root and Tk.Toplevel()) -- PythonDataProcessing.py --
>>> tkinterErrorMessage.py (includes another Tk.Toplevel()).
>>>
>>> When I run this on my computer via python main.py, the initial toplevel
>>> window opens, and any subsequent error message pulls up toplevel windows as
>>> expected. When I put it all through Pyinstaller and run the app, instead of
>>> a tkinter toplevel error message, I get initial main.py toplevel window,
>>> almost like the program is running itself again. WTF?
>>>
>>> I suspect this has to do with hooks in some way? Has anyone run into
>>> something like this? Wtf is going on? Like they say.. NOTHING IS EASY!!!!!
>>> Thanks for your help!
>>>
>> --
>> 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/4aa122fb-a375-4f52-9a6e-a6507dbe695a%40googlegroups.com
>> <https://groups.google.com/d/msgid/pyinstaller/4aa122fb-a375-4f52-9a6e-a6507dbe695a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
>
> --
> 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/CALGmxELiuCT1M9T9wwxY7aJ8O3zGHED9POrXD7-bXFJFj9VvRA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pyinstaller/CALGmxELiuCT1M9T9wwxY7aJ8O3zGHED9POrXD7-bXFJFj9VvRA%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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CABcGCZvOVKuYucHYQ5O6ZW0%2BR_A23YfnoRpRyQcsbXgw2wyMwQ%40mail.gmail.com.

Reply via email to