Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'importing': 0.04; 'failing': 0.05; 'tkinter': 0.07; 'scripts': 0.09; 'python': 0.09; 'effect.': 0.09; 'subject:script': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'do,': 0.15; '9.0': 0.16; 'adam': 0.16; 'ben,': 0.16; 'benjamin': 0.16; 'eclipse': 0.16; 'idlelib': 0.16; 'oct': 0.16; 'scripts.': 0.16; 'somehow,': 0.16; 'sooner.': 0.16; 'subject: \n ': 0.16; 'subject:run': 0.16; 'tkinter.': 0.16; 'uninstalling': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'thanks,': 0.18; 'module': 0.19; 'variable': 0.20; 'all,': 0.21; 'import': 0.21; '3.2': 0.22; 'cheers,': 0.23; 'cc:2**0': 0.23; "haven't": 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'host': 0.24; 'script': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'module.': 0.27; 'run': 0.28; 'environment': 0.29; 'installed,': 0.29; "i'm": 0.29; 'function': 0.30; 'code': 0.31; 'running': 0.32; 'asked': 0.33; 'environment,': 0.33; 'idle': 0.33; 'front': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'problem,': 0.35; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'modules': 0.36; 'october': 0.37; 'does': 0.37; 'option': 0.37; 'uses': 0.37; 'moment': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'release': 0.39; 'called': 0.39; 'where': 0.40; 'end': 0.40; 'your': 0.60; 'different': 0.63; 'helping': 0.63; 'gave': 0.65; 'reply': 0.66; 'heavy': 0.83; 'fat': 0.84; 'subject:any': 0.84; 'scraping': 0.91; 'instantly': 0.93 Newsgroups: comp.lang.python Date: Sun, 14 Oct 2012 19:48:04 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=199.27.168.23; posting-account=sA_8ZwoAAABx-pVe8mvhnwZ9ZkHigpPR References: <2bc334bc-6b2c-45f2-94ed-5933c196f47a@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 199.27.168.23 MIME-Version: 1.0 Subject: Re: Can't run any script without it failing due to calling tkinter for no reason From: Adam G To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 57 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350269293 news.xs4all.nl 6950 [2001:888:2000:d::a6]:43609 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31280 On Sunday, October 14, 2012 7:19:24 PM UTC-7, Benjamin Kaplan wrote: > On Sun, Oct 14, 2012 at 6:47 PM, wrote: >=20 > > Hello All, >=20 > > >=20 > > >=20 > > I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up = my environment somehow, because now I can't run any script without it faili= ng and throwing: >=20 > > ** IDLE can't import Tkinter. Your Python may not be configured for Tk= . ** >=20 > > >=20 > > Yet none of my scripts use tkinter nor call that module. They're simple= network scraping scripts. I use pydev and eclipse and must've fat fingered= something that screwed up my python environment, but I haven't the slighte= st clue on how to fix it. I can run my scripts in idle no problem, but I've= built them as command line apps. I've tried uninstalling python 3 and rein= stalling it to no avail. What did I do, and how can I fix it? >=20 > > >=20 > > Thanks, >=20 > > Adam >=20 > > -- >=20 >=20 >=20 > IDLE uses Tkinter. If you don't have Tk installed, just run the >=20 > scripts from the terminal or pick a different IDE. Hi Ben, Your reply instantly triggered my aha moment and I figured it out. I had an= import to idlelib in one of my modules dependencies from an eclipse auto-i= mport. I feel foolish for not seeing it sooner. I use eclipse and pydev and= use a module to do all the heavy network code for my front end command lin= e scripts. In that module I used a function variable called host where ecli= pse, oh so helpfully, gave me the option of resolving an import I never ask= ed for by automatically importing some module from idlelib. It was from idl= elib import host as HOST or something to that effect. Damn eclipse does tha= t to me from time to time and it happens so fast I don't even see what it d= oes. Thanks for the reply and helping me see my erroneous ways. Cheers, Adam