Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'php.': 0.07; 'rename': 0.07; '22,': 0.09; 'assuming': 0.09; 'oh,': 0.09; 'postgresql,': 0.09; 'rewrite': 0.09; 'subject:script': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'wrote': 0.14; '.py': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'name)': 0.16; 'numbered': 0.16; 'pulling': 0.16; 'rewriting': 0.16; 'script?': 0.16; "someone's": 0.16; 'subject:import': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'module': 0.19; 'server,': 0.19; 'thu,': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'rid': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'host': 0.29; 'am,': 0.29; 'moved': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'getting': 0.31; 'file': 0.32; 'run': 0.32; 'open': 0.33; 'could': 0.34; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'idle': 0.36; 'right?': 0.36; "didn't": 0.36; 'changing': 0.37; 'server': 0.38; 'files': 0.38; 'hosted': 0.39; 'called': 0.40; 'flat': 0.60; 'course': 0.61; "you're": 0.61; 'name': 0.63; 'personal': 0.63; 'finally': 0.65; 'click': 0.77; 'heh.': 0.84; 'subject:All': 0.84; 'to:none': 0.92; 'hand,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=vKGuLoFdbgZaCFla80QJA0gVHLTpqHHOSrZ9J7p5/4Q=; b=QRQ+B2CVGs4Fn0JH8NV+BwE3zthrA6Jk9bJCoLRFY0JBOx+MoVcT/ZqNxflbOujvlQ CdGlXSyWqwz3lExi8S9mLxmu7r/KrhKq9kQ5Hd/7Rs33c3TK7BkUht1bPQmT5it1s1d7 +U32XNtao2taUYGeaYBFUiQOULJgsFJ8G+9BpvMZrNYz8NTtEZPEA+FsPneVcoVjygfn Qv+tOXqGD2qbumi1K2FTZb1674MbEnnzVUWrko7Bk/ZdXEld43HMmo8IPEnG57RcbZqQ QtH3aEiBzsjTVelPP+82TbazMUhg70jkz1beSOmIPYUY1yDya6+xuvz1HB5OOUbh9cwK 0rEw== MIME-Version: 1.0 X-Received: by 10.52.93.201 with SMTP id cw9mr640171vdb.80.1400683259030; Wed, 21 May 2014 07:40:59 -0700 (PDT) In-Reply-To: <537CB71E.5060506@gmail.com> References: <537CB71E.5060506@gmail.com> Date: Thu, 22 May 2014 00:40:58 +1000 Subject: Re: All-numeric script names and import From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400683267 news.xs4all.nl 2924 [2001:888:2000:d::a6]:51078 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71859 On Thu, May 22, 2014 at 12:24 AM, Mark H Harris wrote: > On the other hand, if you open IDLE and then open the 1.py module (yes, > that's a dumb name) and then click run--> run module it will import and > run... assuming 1.py contains some valid python code. Oh, it runs fine as an application, just not importably. > Why must you have a numbered script? > > You're just pulling someone's chain, right? Heh. No, I'm actually finally getting around to rewriting something in Python. It's been called 1 for as long as it's ever existed, having made the jump from a flat file in my personal directory to a web site, and since then from MySQL to PostgreSQL, and finally now I'm getting rid of the last artefact of the old web host by ditching PHP. Yes, I wrote it in PHP because it was hosted on a server that didn't support Python, and when I moved everything onto my own server, I didn't rewrite it. But that's no excuse for changing the name now :) http://rosuav.com/1/ Now, I could of course rename the .py files while still having it at /1/ on the site, but that's cheating. :) ChrisA