python - Use .py or .pyc file when sharing/backing up? -
this answer tells me .pyc file gets created when .py file run, understand saves loading time when re-run. makes me wonder point of .py file after .pyc created.
when backing code, or sharing it, don't want include redundant or extraneous files. filetype should focus on?
side question: have 1 script calls another. after running them, called script got .pyc file written, master script calling did not. why be?
if want run python script, really need .pyc
bytecode generated source code. see here details on running .pyc
file. warn of detials bit twisty.
however recommend including source code , leaving out .pyc
files generated automatically python interpreter. besides, if you, or person want revise/revisit source code @ later point, need .py
files. furthermore, best practice include source code.
Comments
Post a Comment