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


Groups > comp.lang.python > #108103

How to call a Python Class?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From David Shi <davidgshi@yahoo.co.uk>
Newsgroups comp.lang.python
Subject How to call a Python Class?
Date Tue, 3 May 2016 22:56:25 +0000 (UTC)
Lines 9
Message-ID <mailman.366.1462316531.32212.python-list@python.org> (permalink)
References <1659145888.152847.1462316185321.JavaMail.yahoo.ref@mail.yahoo.com> <1659145888.152847.1462316185321.JavaMail.yahoo@mail.yahoo.com>
Reply-To David Shi <davidgshi@yahoo.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de GuxOX9xJNwAZopi0iq0AbgOqAUxgoXXDfAnFXuX34rAw==
Return-Path <davidgshi@yahoo.co.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'subject:How': 0.09; 'python': 0.10; 'from:addr:davidgshi': 0.16; 'from:name:david shi': 0.16; 'help?': 0.16; 'intersection': 0.16; 'magic': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'reply-to:addr:davidgshi': 0.16; 'reply-to:name:david shi': 0.16; 'script.': 0.18; 'to:name:python- list@python.org': 0.20; '"",': 0.22; 'tried': 0.24; 'import': 0.24; '(most': 0.24; 'software.': 0.25; 'skip:" 20': 0.26; "skip:' 10": 0.28; 'class': 0.33; 'source': 0.33; 'message.': 0.33; 'open': 0.33; 'file': 0.34; 'header:Received:8': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'skip:& 10': 0.37; 'to:addr:python.org': 0.40; 'within': 0.64; 'received:67.195': 0.67; 'received:98.137': 0.67; 'regards.': 0.67; 'header:Reply-To:1': 0.67; 'received:gq1.yahoo.com': 0.72; 'received:mail.gq1.yahoo.com': 0.72; 'message-id:@mail.yahoo.com': 0.84; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'subject:Class': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1462316351; bh=F0ufcKBEsqpXR/QTuQg37YfBoRABGm95wWwQ+cq97Gc=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=AycmiC86HDbJD+SN50SlyKdD9m/a+PrntvZ41Bj2pZcz7orE62lPmIUJjoydhM3GoKI1XfITvThuCiWAHWCyL/6lhY7YjSdUM2LqF45WJsxKXUR6Bv/FaAt3cEZTdqXDI3MJGq4W8w9OPSywVlAU/lncjvVoEkyW7TYhU/o8F9YxmXWSoL08Bbo8JEUlAjaUWx3Rl58btWKGlKjzo178i+CdiRHEsiCgmW+tmsDdwz221OBQvTkwDb1TuBXtIBH2DqhFIJHYQo3KTzpMs9zKIrhx8al/Q50D0cGG/NXao0NkNgTIUC9IglZgo7y/bItt8O0yFXocDTMv9qSSEfrINg==
X-Yahoo-Newman-Property ymail-4
X-Yahoo-Newman-Id 213241.2527.bm@omp1002.mail.ir2.yahoo.com
X-YMail-OSG 8L11WI0VM1kCKsVz2BXRTQ0EUlx9QFEOFIyQ9EPjc_GCd0HSzBnbwg4NAhJdd7a f_bbeWMsERPyW8bhndqWpjSX_2JmhSD_q_ZEDc3WlxDKzyp36u91I1QQ0OJ0y2V9WPHGdxJpl6F4 hNFBdjGBvi.BD3sS07_a9Mm6EarxrHnqqkSiwmVAeOnvWIEgv2ewyOZ2vHb9fHy5tuXPVSzZal94 L9clv13yS.LzgV5v5XbxtvbYYO4BnSM2iXSWlzogWFT8mLth4PjmP3QBAI.i0_kD57CXR5YLq6LR gkOhaHMzleJMLq8HkFgNI2iKESPgEcdjzl3U1w3dFH52x8McXw4zcL2OahhNEv5qY.kjOYESSh5s cz0heDAC9gCIaVXlc58pc4EvQJhTdiXHGkICVA7U07lQL.ApT3vzNdT6ANAF3.lwWbxJ3B.rqcXP I8TyUH2DL7GBLcgDpJtVGTY8gUkWtm1H0q2GKghYSns3Ub1hyRjOwWJDkXO9kdNemMmVegRt49Zc K0_KLPNdYPS_l6ltWeH0HPA--
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <1659145888.152847.1462316185321.JavaMail.yahoo@mail.yahoo.com>
X-Mailman-Original-References <1659145888.152847.1462316185321.JavaMail.yahoo.ref@mail.yahoo.com>
Xref csiph.com comp.lang.python:108103

Show key headers only | View raw


I found a Python class within an Open Source software.
I would like to use it in my own Python script.
I tried to import it, but I got following message.
from intersection import *Traceback (most recent call last):  File "<pyshell#4>", line 1, in <module>    from intersection import *ImportError: bad magic number in 'intersection': b'\x03\xf3\r\n'
Can any one help?
Regards.
David

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


Thread

How to call a Python Class? David Shi <davidgshi@yahoo.co.uk> - 2016-05-03 22:56 +0000

csiph-web