Hi bwoodsend,
I have try the code you send to me in 3 or 4 programme and no error come
out.
Yes i am able to share a code. This one is the shorter whit a module i have
made. It is the one that i have made in a formation video i fallowing to
try auto-py-to-exe. But the result is the same whit other's code i have
made and they have more module i have made. This code are in Python 3.9
and i use PyCharm 2020.3 commutiny for idle.
The main code:
import tkinter
import game
import sys
sys.modules["subprocess"] = None
def open():
game.run()
app = tkinter.Tk()
app.title("Mon app tkinter")
app.geometry("300x100")
lb = tkinter.Label(app, text="Cliquer sur le bouton...").pack()
bt = tkinter.Button(app, text="Hack tkinter", command=open).pack()
app.mainloop()
The module code:
import pygame
def run():
pygame.init()
screen = pygame.display.set_mode([400, 400])
launched = True
while launched:
for event in pygame.event.get():
if event.type == pygame.QUIT:
launched = False
screen.fill((12, 25, 38))
pygame.draw.line(screen, (128, 25, 240), [10, 10], [280, 310],
3)
pygame.display.flip()
pygame.quit()
Thank a lot!
Le mardi 16 mars 2021 à 11 h 29 min 10 s UTC-4, bwoodsend a écrit :
> Subprocess is part of the standard library
> <https://docs.python.org/3/library/subprocess.html>. As for indirectly
> using it - If you put:
>
> import sys
> sys.modules["subprocess"] = None
>
> at the top of your code then run it normally in Python, do you get an
> error saying ModuleNotFoundError: import of subprocess halted; None in
> sys.modules? If not, are you able to share your code?
>
--
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/2058467c-fefa-4010-9129-de67b666d67en%40googlegroups.com.