Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.091 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'rename': 0.07; 'python': 0.11; 'bytecode': 0.16; 'identifier.': 0.16; 'subject:Different': 0.16; 'wrote:': 0.18; 'module': 0.19; 'load': 0.23; 'header:User- Agent:1': 0.23; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'character': 0.29; 'file': 0.32; 'period': 0.33; 'could': 0.34; 'created': 0.35; 'problem.': 0.35; 'one,': 0.35; 'there': 0.35; 'hi,': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'tell': 0.60; 'such': 0.63; 'within': 0.65; 'received:74.208': 0.68; 'legal': 0.71; 'as:': 0.81; 'received:74.208.4.194': 0.84 Date: Sat, 20 Apr 2013 07:09:18 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Different cache filename References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:poIIdBsM3iQ4CFk6MrFl2AReA6+lAhul7/HwnAn/p1b etZKSaylbsuPDwxcMK6y3RMh/x+4I3WWJb6bSJel/MdSX+rUVd 1IO8Qsn/r1gF054VD+roisH6A1a7lCFPmjAJCky3LEWCe92It4 AYfT1M3cceUwVY4dn5XeiDQEiap/5axrirllRRd5goYB1pwLPn +b/RbRnNuNIrqg2NaSumKlvyMo164IW/gy2VBefS2DH7m0XI9P 7w79d8TCahaBOxjhv4coTk6nkAfbUtbji2hausDESVq7aInfmT boe2KUsIBgdDU3d1tU2l6bd4vL6bv1jD0ShcoxmBlFjUTirXA= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366456211 news.xs4all.nl 2298 [2001:888:2000:d::a6]:50138 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43954 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