Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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:not': 0.03; 'interpreter': 0.05; 'environments': 0.07; 'python3': 0.07; 'subject:Error': 0.07; 'sys': 0.07; 'try:': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; '11:59': 0.16; '24,': 0.16; "can't.": 0.16; 'chris,': 0.16; 'class:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'module': 0.19; '>>>': 0.22; 'import': 0.22; '(in': 0.22; 'cc:addr:python.org': 0.22; 'tells': 0.24; 'environment': 0.24; 'cc:2**0': 0.24; 'compare': 0.26; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'developers.': 0.31; 'file': 0.32; 'subject:the': 0.34; "i'd": 0.34; 'something': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'doing': 0.36; 'thanks': 0.36; 'should': 0.36; 'pm,': 0.38; 'expect': 0.39; 'how': 0.40; 'tell': 0.60; 'different.': 0.84; 'to:none': 0.92; 'from.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=dz7saqaDjzcTSE6Pwta4Do5Md52Lcv5GzMTMF/gyvy4=; b=SHl3Sfr80H0AMe2v2sQO9mHx6EqcFaX/KmlIwOB9tqtH1N5XpmoVQiy3NuuoCnFrfj xeb9K+2kPsgPxmYECqqa2TuJMSQWRR0f1cDZCb0SCjh8fnKgtBudiyJICQltkggJohWG hjHY9wkGgJi50fbJp4FRAWCeGSaT4IYg/zhEoTG4jCG+0aeCAnf0WWpts3NwCuhSJEjQ MQCOUKc2/amJXRQ1ZcT0MbXMvu8U94xR0foqwdJfr6PJWT2281l7m9aU6DA7+v3WNJpV Sjtzw1yWTNGswm8jBTR5NR67RU2JDTDFqQBtJ4k2E+N9KXNwAZLvzur9sXvtTU8gV2I+ 3gmQ== MIME-Version: 1.0 X-Received: by 10.220.89.4 with SMTP id c4mr614898vcm.53.1403618694613; Tue, 24 Jun 2014 07:04:54 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Jun 2014 00:04:54 +1000 Subject: Re: Error in PyDev but not in the standard python interpreter From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403619019 news.xs4all.nl 2910 [2001:888:2000:d::a6]:42146 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73548 On Tue, Jun 24, 2014 at 11:59 PM, Fabien wrote: > Hi Chris, > > thanks for the hint. Indeed they are not an instance of the same class: > >>>> isinstance(d1, datetime) > Out[6]: False >>>> isinstance(d2, datetime) > Out[7]: True > > so this is something I should check with the NetCDF4 package developers. > > While The python interpreter can compare them, my pydev environment can't. > Is pydev doing something "better" then python3 "alone"? > Here's what I'd try: >>> import sys >>> sys.modules[d1.__class__.__module__].__file__ >>> sys.modules[d2.__class__.__module__].__file__ Do those in both environments and see where things are actually coming from. (In PyDev, I expect that to tell you exactly the same file names as your question-mark inspection tells you, as that'll be how it obtains the information.) It might be that your module search path is different. ChrisA