Different cache filename
Dave Angel
davea at davea.name
Sat Apr 20 07:09:18 EDT 2013
On 04/20/2013 01:37 AM, Fabian PyDEV wrote:
> Hi,
>
> when load a module "mymodule.py" with importlib.machinery.SourceFileLoader a bytecode file is created as mymodule.cpython-33.pyc.
>
> If I load a module "mymodule.ext.py" the same way the same bytecode file is created as mymodule.cpython-33.pyc.
>
> Is there any way I could tell python to generate the bycode file as mymodule.ext.cpython-33.pyc?
>
> Regards,
> Fabian
>
Rename the source file to a legal one, such as:
mymodule_ext.py
and you won't have the problem. Period is not a valid character within
a Python identifier.
--
DaveA
More information about the Python-list
mailing list