For a hierarchical project, the EXE file generated by "pyinstaller" does not start.
Mohsen Owzar
mohsen.owzar at gmail.com
Wed Dec 8 04:40:10 EST 2021
Chris Angelico schrieb am Dienstag, 7. Dezember 2021 um 19:16:54 UTC+1:
> On Wed, Dec 8, 2021 at 4:49 AM Mohsen Owzar <mohsen... at gmail.com> wrote:
> > *******************************************************************
> > GPIOContrl.py
> > *******************************************************************
> > class GPIOControl:
> > def my_print(self, args):
> > if print_allowed == 1:
> > print(args)
> >
> > def __init__(self):
> Can't much help with your main question as I don't do Windows, but one
> small side point: Instead of having a my_print that checks if printing
> is allowed, you can conditionally replace the print function itself.
>
> if not print_allowed:
> def print(*args, **kwargs): pass
>
> ChrisA
Thanks Chris
Your answer didn't help me to solve my problem, but gave me another idea to write a conditional print statement.
Regards
Mohsen
More information about the Python-list
mailing list