Why do full path names to module show up multiple times in .PYC files?

python at bdurham.com python at bdurham.com
Thu Feb 18 15:32:12 EST 2010


I just happened to look at a compiled Python 2.6.4 .PYC file in
an editor and noticed that the full path and file name of the
compiled module showed up in my .PYC file at least 10 different
times. Is there a reason for full vs. relative path names and why
does the module name need to be duplicated so many times?

It appears that .PYO files only use a filename (without a path).

I assume the only way for us to suppress path names (which may
have confidential client names) in our compiled distributions is
to use .PYO vs. .PYC files? Is this correct?

Thanks,
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100218/1ee7ae40/attachment.html>


More information about the Python-list mailing list