Python Forum
Using --windowed on Pyinstaller disables output for GUI. (Or what else can I use)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using --windowed on Pyinstaller disables output for GUI. (Or what else can I use)
#3
(Jun-25-2018, 10:39 AM)snippsat Wrote:
(Jun-25-2018, 02:51 AM)Nwb Wrote: Is it possible to hide the console whilst still preserving the function of the script fully?
Are you running Windows or Linux? You are using --windowed which is a Windows and Mac OS feature. It could be a problem in your code and this PAGE stuff with Pyinstaller. Looking at your code and try to run i am missing import unknown_support I guess this is something that local to you,and that this PAGE GUI maker has for a project. Example Hello World Tkinter
(gui_env) E:\1\gui_env λ pyinstaller tk_test.py --onefile --windowed 814 INFO: PyInstaller: 3.3.1 814 INFO: Python: 3.6.4 814 INFO: Platform: Windows-10-10.0.17134-SP0 824 INFO: wrote E:\1\gui_env\tk_gui.spec 930 INFO: UPX is not available. .................ect 
Generate in dist/ folder tk_test.exe,only GUI no console. [Image: aEfuQr.jpg]

I'm using windows. And it seems that the Hello-World script works fine when compiled to an executable but it is only this script that is having an issue.

I too suspect it has to do with PAGE but do you have any lead?

Are there any limitations on modules?

By the way here is what is inside the support module (frankly it can be commented out because it serves no purpose, or I don't know what it even is there for):

#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# Support module generated by PAGE version 4.14
# In conjunction with Tcl version 8.6
#    Jun 15, 2018 02:37:41 PM


import sys

try:
    from Tkinter import *
except ImportError:
    from tkinter import *

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

def init(top, gui, *args, **kwargs):
    global w, top_level, root
    w = gui
    top_level = top
    root = top

def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None

if __name__ == '__main__':
    import unknown
    unknown.vp_start_gui()
Those are the only two files.

The script also uses pymsgbox, you can comment out the msgboxes.
Reply


Messages In This Thread
RE: Using --windowed on Pyinstaller disables output for GUI. (Or what else can I use) - by Nwb - Jun-25-2018, 04:27 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020