program deployment

Ravi Teja webraviteja at gmail.com
Fri Jan 5 08:01:10 EST 2007


king kikapu wrote:
> hi to all folks here,
>
> i am learning Python, just finished a book and i am starting to write
> programs.
> I just want to ask, is the "correct" way to deploy my programs to other
> computers, the .pyc files ??
>
> I now that with the "-m compileall ." switch can compile a .py file
> into bytecodes. So i suppose that if Python has to run a .pyc file, it
> will load and execute it faster. And if i have some "sensitive" data in
> my source, like passwords (and the source of cource!) they will be more
> secure in a compiled file.
>
> Is that correct ?
>
> Thanks a lot for any help!

Python code is normally deployed as straight source code. It gets
compiled  automatically on its first run and will subsequently load
this quickly. Passwords do not belong in the source code and they are
not secure simply by distributing bytecode instead. This applies to any
language, native or byte code compiled. Distributing bytecode may deter
non-technical users but that's just about it.




More information about the Python-list mailing list