Inside Python: How to create pyc files manually? (Part-2)

preview_player
Показать описание
This video explains how how to create pyc files explicitly.

------------------------------------------------------------

More awesome topics covered here:

------------------------------------------------------------

#python #pyc
Рекомендации по теме
Комментарии
Автор

under windows you also can use the Command-Prompt and go to desktop with cd desktop and type in :
python -m file.py
He also compiles the pyc file, you don´t have to open python in console and type in a script

deoskill
Автор

This was superhelpful and crisp, kudos to that !! Quick question, How do I run a .pyc file which has dependencies on other modules (i.e imports other modules from the same directory). Becz when I do that, it displays an error showing "ModulenotFoundErroe: missing the module X" Would really appreciate your help on understanding this !!

NikhilPareek
Автор

but anyone can decompile our file with single command is there any way to give security in file where no one will decompile it ever

ravishankarbirajdar
Автор

Import test.py would do the same thing probably.

SHONNER
Автор

thank you for the explanation, but the way you pronounce 'module' xD

ggezGuy