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


Groups > comp.lang.python > #52247

Re: Resolving import errors reported by PyLint in modules using Python.NET

Path csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <bsk16@case.edu>
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; 'scripts': 0.03; 'explicitly': 0.05; 'url:pipermail': 0.05; 'string': 0.09; 'received:209.85.219': 0.09; 'referenced': 0.09; 'runtime': 0.09; 'subject:modules': 0.09; 'subject:using': 0.09; 'supported,': 0.09; 'python': 0.11; "wouldn't": 0.14; '10:17': 0.16; 'complacent': 0.16; 'imports': 0.16; 'ironpython': 0.16; 'python.net': 0.16; 'reasonably': 0.16; 'string:': 0.16; 'subject:Python.NET': 0.16; 'subject:import': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'passing': 0.19; 'things.': 0.19; 'thu,': 0.19; 'example': 0.22; 'import': 0.22; 'aug': 0.22; 'to:name :python-list@python.org': 0.22; 'dll': 0.24; 'module,': 0.24; 'looks': 0.24; '(see': 0.26; 'header:In-Reply-To:1': 0.27; '----': 0.29; 'patch': 0.29; 'wonder': 0.29; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; 'code': 0.31; 'getting': 0.31; 'figure': 0.32; 'know.': 0.32; 'url:python': 0.33; 'guess': 0.33; "can't": 0.35; 'received:209.85': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'curious': 0.36; "i'll": 0.36; 'url:org': 0.36; 'received:209': 0.37; 'being': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'unable': 0.39; 'either': 0.39; 'url:mail': 0.40; 'even': 0.60; 'new': 0.61; 'kind': 0.63; 'telling': 0.64; 'more': 0.64; 'evaluate': 0.72; 'expose': 0.84; 'succeed.': 0.84; '2013': 0.98
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=h5fHxI6Cm4I+Z2TfnhJEhBebMG6rLtrQghJeACuXWXw=; b=U91E6rP8XkrL2U765xgNm0pCN5icaLzzLLao9sIjCBlzyK6/K48SRzOv+vqCbB04nt 1Uoo361ttqMXQtwqceO0Z0iDykXdzGFhkN0WUxwfdM79LLfnydexfbTHJLT/m+JOYhk4 02kGhWlTWy9Sg0dH9ZMs3fPCHqXY11sMombBlOwCVyJjFETa1BjP2+B3Xo4SF0XX88e/ XCQAmDYLFlhr+pyb4yfQNs3YfPzYvBFSQL7CNL5f68IkiQUj2mE3d2/SWcSebq1imXNJ 945i1pu8RRRQzWad8XmuqKM5JsqfZzw4/sQVDEtnImfz44nj0xDgWjf/nXPWVFEaH9I/ HdpQ==
X-Gm-Message-State ALoCoQmV+l/L0V+9lJ3fwiIgRt0evigNt8UCRIuLNvxEvf9BM8/3GL5qlnBB/0dYDa7uTFoUasDGBUY3wy3Fv+F6ik1SOA6hIIfxrbpLpVOoUtmmfpmi8eFx36+ttCTj6BRNc7M4D6NgJjONmKtveJ4akwODl3VrSA==
X-Received by 10.60.134.230 with SMTP id pn6mr7092362oeb.52.1376027284101; Thu, 08 Aug 2013 22:48:04 -0700 (PDT)
X-Received by 10.60.134.230 with SMTP id pn6mr7092354oeb.52.1376027284006; Thu, 08 Aug 2013 22:48:04 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <2401ddc7-0fe0-4cd9-b7cf-f2dd8649c58f@googlegroups.com>
References <2401ddc7-0fe0-4cd9-b7cf-f2dd8649c58f@googlegroups.com>
From Benjamin Kaplan <benjamin.kaplan@case.edu>
Date Thu, 8 Aug 2013 22:47:43 -0700
Subject Re: Resolving import errors reported by PyLint in modules using Python.NET
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Junkmail-Whitelist YES (by domain whitelist at mpv1.tis.cwru.edu)
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>
Newsgroups comp.lang.python
Message-ID <mailman.386.1376027668.1251.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376027668 news.xs4all.nl 15970 [2001:888:2000:d::a6]:40755
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52247

Show key headers only | View raw


On Thu, Aug 8, 2013 at 10:17 PM,  <adam.preble@gmail.com> wrote:
> PyLint can't figure out imports of .NET code being referenced in my Python scripts that use Python.NET.  I can kind of see why; you have to evaluate some clr.AddReference calls for the imports to even succeed.  I wonder if I have any recourse.  Generally, to import a DLL you have to do a few things.  I guess for an example I'll import a .NET string:
>
> ----
> import clr    # Python .NET common-language runtime module, the important part of it all
>
> clr.AddReference("System")
> from System import String   # .NET System.String
>
> can = String("Spam")
> ----
>
> PyLint is not amused:
> F:  4, 0: Unable to import 'System' (import-error)
>
> I wondered if there were any tricks to make it work.  I don't want to just ignore import-error, either by explicitly telling pylint to ignore them, or be getting complacent in seeing them all the time.  I am also kind of curious if PyLint will expose new problems if it's able to figure out more things after successfully  passing the imports.  I wouldn't really know.

Are you using Python.NET or IronPython? IronPython is reasonably well
supported, and it looks like there's a patch you can use to get PyLint
working on it (see
http://mail.python.org/pipermail/ironpython-users/2012-June/016099.html
). Not sure what's going on with Python.NET

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


Thread

Resolving import errors reported by PyLint in modules using Python.NET adam.preble@gmail.com - 2013-08-08 22:17 -0700
  Re: Resolving import errors reported by PyLint in modules using Python.NET Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-08-08 22:47 -0700
    Re: Resolving import errors reported by PyLint in modules using Python.NET adam.preble@gmail.com - 2013-08-11 21:21 -0700

csiph-web