Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43954 > unrolled thread

Re: Different cache filename

Started byDave Angel <davea@davea.name>
First post2013-04-20 07:09 -0400
Last post2013-04-20 07:09 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Different cache filename Dave Angel <davea@davea.name> - 2013-04-20 07:09 -0400

#43954 — Re: Different cache filename

FromDave Angel <davea@davea.name>
Date2013-04-20 07:09 -0400
SubjectRe: Different cache filename
Message-ID<mailman.852.1366456211.3114.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web