[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python?
> >One of the things I need to do is modify a python install program.
> >Can someone save me some time and tell me the command to (compile?)ich
> >turn a "*.py" source file into a "*.pyc" binary file???
>
> Why do you need to do this?
I'm doing this for the BSware-XFS project. I need to modify one of
the python install scripts. (it's a major change, I need to change
a "3" to a "1" in one .py file as recommended by SGI :)
> .pyc files are Python modules compiled into bytecode which is executed by
> the Python virtual machine. That compilation is automatic. If the source
> .py module has not been compiled before or has changed, Python recompiles
> it when it is imported or executed.
>
> In short, you shouldn't have to manually recompile.
What concerns me is the .py & .pyc files are both on the CD and it
would seem like python would have a difficult time creating a new
.pyc file on a _CDR_ automatically.
However, I changed ONLY the .py file on the CD and it seemed to work
okay. Maybe the installer copies the files to HDD or ram disk first?
In any case, I'd like to create a new .pyc file on the CD just to be
safe. If I can figure out how . . .
--------------------------------------------
Bruce Smith bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan 49093 USA
http://www.armstrong-intl.com/
--------------------------------------------