Re: [PyInstaller] Re: Pyinstaller: calling another Tkinter restarts the app and doesn't bring up other Toplevel() window.

2020-02-24 Thread JAY JAY
Chris, I really appreciated your very thoughtful and encouraging message. 
This will help me learn python and move forward in a more idiomatic way. 
You rock!! I will spend some time on what you recommend. Looking forward to 
checking out your work too.

Jay

On Monday, 17 February 2020 16:16:59 UTC-6, Chris Barker 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  > 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 pyins...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pyinstaller/4aa122fb-a375-4f52-9a6e-a6507dbe695a%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR(206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115   (206) 526-6317   main reception
>
> chris...@noaa.gov 
>

-- 
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 pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3f4d9acf-9b22-45a2-956b-d6d89e5a79a3%40googlegroups.com.


[PyInstaller] Re: Packaging gst-python

2020-02-24 Thread MathieuP
The important parts didn't make it through Nabble, so I'll add them here.

Here is how I build gst-python:
--with-libpython-dir="/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu"

The additional data I pass in my spec file:
("gst_niro_test.py", "python")

The gst-python plugin is located there:
gst_plugins/libgstpython.cpython-36m-x86_64-linux-gnu.so

My test element is in:
python/gst_niro_test.py

And the error I have trying to run it is:
(entry:11): GStreamer-WARNING **: 22:23:36.187: Element factory metadata for
'nirotest' has no valid long-name field
Traceback (most recent call last):
  File "entry.py", line 13, in 
GLib.Error: gst_parse_error: no element "nirotest" (1)
[11] Failed to execute script entry



--
Sent from: http://pyinstaller.47505.x6.nabble.com/

-- 
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 pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/1582496906253-0.post%40n6.nabble.com.


[PyInstaller] pyinstaller .app doesn't work on other people's computers unless I do chmod +x

2020-02-24 Thread JAY JAY
Hopefully a simple question, but I can't run my app once I send it to 
someone else, or upload it and download it to my own computer:

"The application X cannot be opened."

Once I add chmod +x, it works! So, I'm almost there! How do I make this 
possible?

Bonus: is there any way to avoid the unidentified developer message, which 
requires you to right-click and select Open on a mac? Thanks!!!

-- 
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 pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/130c06ea-0cfd-4e40-be87-eb2f13b7bcc2%40googlegroups.com.