Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31280

Re: Can't run any script without it failing due to calling tkinter for no reason

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 <pythonusernw@gmail.com>
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 <mailman.2193.1350267563.27098.python-list@python.org>
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> <mailman.2193.1350267563.27098.python-list@python.org>
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 <pythonusernw@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.2195.1350269293.27098.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sunday, October 14, 2012 7:19:24 PM UTC-7, Benjamin Kaplan wrote:
> On Sun, Oct 14, 2012 at 6:47 PM,  <pythonusernw@gmail.com> wrote:
> 
> > Hello All,
> 
> >
> 
> >
> 
> > 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 failing and throwing:
> 
> > ** IDLE can't import Tkinter.  Your Python may not be configured for Tk. **
> 
> >
> 
> > 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 slightest 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 reinstalling it to no avail. What did I do, and how can I fix it?
> 
> >
> 
> > Thanks,
> 
> > Adam
> 
> > --
> 
> 
> 
> IDLE uses Tkinter. If you don't have Tk installed, just run the
> 
> 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-import. 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 line scripts. In that module I used a function variable called host where eclipse, oh so helpfully, gave me the option of resolving an import I never asked for by automatically importing some module from idlelib. It was from idlelib import host as HOST or something to that effect. Damn eclipse does that to me from time to time and it happens so fast I don't even see what it does. Thanks for the reply and helping me see my erroneous ways.

Cheers,
Adam

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Can't run any script without it failing due to calling tkinter for no reason pythonusernw@gmail.com - 2012-10-14 18:47 -0700
  Re: Can't run any script without it failing due to calling tkinter for no reason Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-10-14 19:18 -0700
    Re: Can't run any script without it failing due to calling tkinter for no reason Adam G <pythonusernw@gmail.com> - 2012-10-14 19:48 -0700
    Re: Can't run any script without it failing due to calling tkinter for no reason Adam G <pythonusernw@gmail.com> - 2012-10-14 19:48 -0700

csiph-web