On Sun, 24 May 2009 15:01:51 +0200 Stef Mientki <stef.mien...@gmail.com> wrote:
> Moving my entire program section between windows and Ubuntu, > sometimes causes problems, due to the existence of pyc-files > (and probably because my program still has hard coded paths). > > Now I want get rid of the pyc-files, > so I wrote a py-script to remoce all pyc-files, > but because it's run from the same program section, > a few pyc files are recreated. > > Is there a way to prevent generating pyc-files ? > Or is there a way to redirect the generated pyc-files to a dedicated > location ? Use a "-B" command-line option or "PYTHONDONTWRITEBYTECODE=x" env var. You can put either "alias python='python -B'" or "export PYTHONDONTWRITEBYTECODE=x" to your .bashrc/profile and forget about .pyc/pyo forever. > btw, What commandline switches are available for python ? > (googling didn't give me any relevant hits ) You might be amazed how much insight "man python" and "python -h" can yield ;) -- Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list