Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!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; 'lawrence': 0.09; 'page)': 0.09; 'path)': 0.09; 'path.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:method': 0.09; 'subject:number': 0.09; 'subject:string': 0.09; 'subject:using': 0.09; '4-digit': 0.16; 'great!': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Converting': 0.16; 'troll': 0.16; 'wrote:': 0.17; 'requests': 0.18; 'absolute': 0.23; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'actual': 0.28; 'convert': 0.29; 'from:addr:yahoo.co.uk': 0.32; 'to:addr:python- list': 0.33; 'path': 0.35; 'received:org': 0.36; 'but': 0.36; 'turn': 0.36; 'skip:4 10': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'store': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'back': 0.62; 'dont': 0.64; 'iron': 0.65 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Converting a string to a number by using INT (no hash method) Date: Tue, 22 Jan 2013 16:27:47 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-18-5-153.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: X-Antivirus: avast! (VPS 130122-0, 22/01/2013), Outbound message X-Antivirus-Status: Clean 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: 1358872081 news.xs4all.nl 6944 [2001:888:2000:d::a6]:46945 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37302 On 22/01/2013 16:15, Ferrous Cranus wrote: > I just need a way to CONVERT a string(absolute path) to a 4-digit unique number with INT!!! That's all i want!! But i cannot make it work :( > > And the best part is that "that" number must be able to turn back into a path. > > This way i DON'T EVEN HAVE TO STORE THE ACTUAL HTML PAGE'S ABSOLUTE PATH!!!! > > 1. User requests a specific html page( .htaccess gives my script the absolute path for that .html page) > 2. I turn the path into a 4-digitnumber > 3. i store that number to the database. I DONT EVEN HAVE TO STORE THE PATH TO THE DATABASE ANYMORE!!! this is just great! > Hi Iron Skull, I hereby nominate you for Troll of the Millenium. -- Cheers. Mark Lawrence