Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64181
| From | Alister <alister.ware@ntlworld.com> |
|---|---|
| Subject | Re: Compiling main script into .pyc |
| Newsgroups | comp.lang.python |
| References | <61a24c80-12fd-4c7a-89ed-41e997b66545@googlegroups.com> |
| Message-ID | <EodCu.52414$T%2.47770@fx23.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2014-01-17 17:04 +0000 |
On Thu, 16 Jan 2014 17:01:51 -0800, Sam wrote:
> One thing I observe about python byte-code compiling is that the main
> script does not gets compiled into .pyc. Only imported modules are
> compiled into .pyc.
>
> May I know how can I compile the main script into .pyc? It is to
> inconvenience potential copy-cats.
if you want to stop casual programmers reading your code to see how you
have achieved something don't bother.
1) your code is not that 'Clever'(Hopefully)
2) 'Clever' code is seldom worth copying *
* 'Clever' code usually makes use of obscure functions, side effects &
other features that make it difficult to follow & maintain
just skim through www.thedailywtf.com for examples of 'Clever' code that
should never have seen the light of day.
if you have found a straight forward way to achive complex goal such that
it is worth copying rest assured it will be copied no mater how hard you
try to protect it.
--
#define SIGILL 6 /* blech */
-- Larry Wall in perl.c from the perl source code
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Compiling main script into .pyc Sam <lightaiyee@gmail.com> - 2014-01-16 17:01 -0800
Re: Compiling main script into .pyc bob gailer <bgailer@gmail.com> - 2014-01-16 21:56 -0500
Re: Compiling main script into .pyc Ned Batchelder <ned@nedbatchelder.com> - 2014-01-16 22:07 -0500
Re: Compiling main script into .pyc MRAB <python@mrabarnett.plus.com> - 2014-01-17 03:19 +0000
Re: Compiling main script into .pyc Dave Angel <davea@davea.name> - 2014-01-16 23:43 -0500
Re: Compiling main script into .pyc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-17 08:40 +0000
Re: Compiling main script into .pyc Grant Edwards <invalid@invalid.invalid> - 2014-01-17 20:12 +0000
Re: Compiling main script into .pyc Terry Reedy <tjreedy@udel.edu> - 2014-01-16 23:45 -0500
Re: Compiling main script into .pyc Alister <alister.ware@ntlworld.com> - 2014-01-17 17:04 +0000
csiph-web