Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:IDLE': 0.03; 'interpreter': 0.05; 'prints': 0.07; 'skip:` 10': 0.07; 'python': 0.08; 'says,': 0.09; 'win32': 0.12; '16,': 0.15; 'cc:addr:python- list': 0.15; 'mon,': 0.15; '"can\'t': 0.16; '"copyright",': 0.16; '"credits"': 0.16; '"license"': 0.16; '2.7.2': 0.16; 'then?': 0.16; 'wing': 0.16; '\xc2\xa0i': 0.16; "\xc2\xa0i'm": 0.16; 'wrote:': 0.16; 'jan': 0.19; 'cheers,': 0.20; 'cc:no real name:2**0': 0.21; 'is?': 0.21; 'header:In-Reply-To:1': 0.22; 'figure': 0.23; 'received:209.85.212.46': 0.23; 'received:mail- vw0-f46.google.com': 0.23; 'command': 0.24; 'shell': 0.24; 'cc:2**0': 0.25; 'parameters': 0.25; 'pm,': 0.26; 'function': 0.27; "i'm": 0.27; 'noticed': 0.28; 'bit': 0.28; 'work.': 0.28; 'script': 0.28; 'message-id:@mail.gmail.com': 0.28; 'idle': 0.28; 'cc:addr:python.org': 0.29; 'second': 0.29; 'server': 0.30; 'lines': 0.30; 'chris': 0.30; 'error': 0.30; "i've": 0.31; 'anyone': 0.31; 'stopped': 0.32; "can't": 0.32; 'received:209.85.212': 0.34; 'suddenly': 0.36; 'run': 0.37; 'machine': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.37; 'not,': 0.37; 'getting': 0.37; 'received:209.85': 0.38; 'hoping': 0.38; "what's": 0.39; 'help': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'difference': 0.40; 'under': 0.40; 'type': 0.60; 'connect': 0.60; 'more': 0.61; 'same,': 0.67; 'gone': 0.68; 'connection,': 0.73; 'different.': 0.84; 'sender:addr:chris': 0.84; 'server)': 0.84; 'url:rebertia': 0.84; 'to:none': 0.93; 'from.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type :content-transfer-encoding; bh=acFayUbftHIG/vaeOm8mkUrFfOA3bz8b+qwW6BjnVxM=; b=JCYXp2ljP+NUET5iFPDxoJDb53P2Jjlu1XJoXXBLem31hwTNZjAWAfN/gqEaaPlgfB j0fgJJs6nuegUrOe4ntdPuy4QCpxzqhgNwtFUfsBwRJ8tvc7ArTAdWL75GGUSGcG+YfZ 8L89tt4gRB/nUCGG7wy6JZGp5uy+h4GXfvh84= MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: <11576187.1088.1326759502632.JavaMail.geo-discussion-forums@vbwl1> References: <11576187.1088.1326759502632.JavaMail.geo-discussion-forums@vbwl1> Date: Mon, 16 Jan 2012 17:11:09 -0800 X-Google-Sender-Auth: zA9vTQ2unKPga1h34nhNeiYTqUc Subject: Re: pymysql only works under IDLE From: Chris Rebert Cc: python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326762671 news.xs4all.nl 6958 [2001:888:2000:d::a6]:33121 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19050 On Mon, Jan 16, 2012 at 4:18 PM, Saul Spatz wrote: > I've been using pymysql to connect to a database, and it has suddenly sto= pped working on the one machine (a virtual server) where I really need it t= o work. =C2=A0I have a function with hard-coded parameters to do the connec= tion, and now I'm getting an error that says, "Can't connect to MySQL serve= r on ...". =C2=A0The strangest thing is that while I can't connect if I run= the script from the command line, or from the shell under Wing IDE, I can = connect if I run the script under the IDLE shell. > > I noticed that the command line shell prints > > Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)]= on win32 > Type "help", "copyright", "credits" or "license" for more information. > > at startup, but the IDLE shell prints > > Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)]= on win32 > Type "copyright", "credits" or "license()" for more information. > > So, while the first lines are identical, the second lines are different. = =C2=A0Is this a different interpreter then? =C2=A0Can anyone tell me what t= he difference is? =C2=A0I'm hoping that may help me figure out what's gone = wrong. You can check the value of `sys.executable` in each to see whether they're the same, and if not, where the other one is from. Cheers, Chris -- http://rebertia.com