Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!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; 'subject:Python': 0.05; 'socket': 0.05; 'sys': 0.05; 'try:': 0.07; 'python': 0.09; 'friday,': 0.09; 'interpreter,': 0.09; 'restarted': 0.09; 'subject:2.7': 0.09; 'subject:module': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:not': 0.11; 'bit.': 0.16; 'from:addr:comcast.net': 0.16; 'outputs': 0.16; 'pythonwin': 0.16; 'socket.': 0.16; 'subject:fails': 0.16; 'subject:import': 0.16; 'subject:urllib': 0.16; 'sys.path': 0.16; 'sys.path:': 0.16; 'two.': 0.16; 'wrote:': 0.17; 'import': 0.21; 'produces': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'tail': 0.29; 'that.': 0.30; 'worked': 0.30; 'problem.': 0.32; 'file': 0.32; 'print': 0.32; 'environment,': 0.33; 'likely': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'thanks': 0.34; 'path': 0.35; 'so,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'end': 0.40; 'from:no real name:2**0': 0.60; 'subject:, ': 0.61; 'first': 0.61; "you'll": 0.62; 'between': 0.63; 'within': 0.64; 'august': 0.66; 'received:209.85.216.184': 0.84; 'subject:found': 0.91 Newsgroups: comp.lang.python Date: Fri, 17 Aug 2012 14:22:38 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.136.9.168; posting-account=hINqSwoAAACa9BnfUo4SmDvMl4mWdwot References: <22db6f61-180c-47ce-a0c3-3315b40b8315@googlegroups.com> <1726c197-b2bb-47d8-982f-9f26af1e310d@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 50.136.9.168 MIME-Version: 1.0 Subject: Re: Python 2.7 import socket urllib fails to load, module not found From: wdtate@comcast.net 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.12 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: 157 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345238561 news.xs4all.nl 6924 [2001:888:2000:d::a6]:49856 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27271 On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > >=20 >=20 > > So, try the following in both environments: >=20 > > import sys >=20 > > for ii in sys.path: print ii >=20 > > >=20 > > You'll likely find diffferences between the two. >=20 >=20 >=20 > > In the pythonwin environment, try: >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > import socket >=20 > >=20 >=20 > > print socket.__file__ >=20 > >=20 >=20 > >=20 >=20 > > Chances are the __file__'s directory isn't in the command line's sys.pa= th. >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > Emile >=20 >=20 >=20 > Done - tail end of the python path had a missing bit...grrrrr... thanks s= o much Well it's bizarre - now it doesn't. did an import sys from within interpre= ter, then did import socket. Worked the first time. Restarted and it happ= ened again. The sys.path outputs are identical. The print socket.__file__= reveals a file that is in the sys.path...grrrr. On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > >=20 >=20 > > So, try the following in both environments: >=20 > > import sys >=20 > > for ii in sys.path: print ii >=20 > > >=20 > > You'll likely find diffferences between the two. >=20 >=20 >=20 > > In the pythonwin environment, try: >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > import socket >=20 > >=20 >=20 > > print socket.__file__ >=20 > >=20 >=20 > >=20 >=20 > > Chances are the __file__'s directory isn't in the command line's sys.pa= th. >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > Emile >=20 >=20 >=20 > Done - tail end of the python path had a missing bit...grrrrr... thanks s= o much On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > >=20 >=20 > > So, try the following in both environments: >=20 > > import sys >=20 > > for ii in sys.path: print ii >=20 > > >=20 > > You'll likely find diffferences between the two. >=20 >=20 >=20 > > In the pythonwin environment, try: >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > import socket >=20 > >=20 >=20 > > print socket.__file__ >=20 > >=20 >=20 > >=20 >=20 > > Chances are the __file__'s directory isn't in the command line's sys.pa= th. >=20 > >=20 >=20 > >=20 >=20 > >=20 >=20 > > Emile >=20 >=20 >=20 > Done - tail end of the python path had a missing bit. Corrected that. th= e sys.path outputs match but I still have the same problem. =20 print socket.__file__ produces a path that is in the pythonpath.