How to call a Python Class?

Ben Finney ben+python at benfinney.id.au
Tue May 3 19:31:52 EDT 2016


David Shi via Python-list <python-list at python.org> writes:

> 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.

Your text is mangled in transit. Please post only plain text messages
(avoid HTML or other “rich” content), so the formatting survives.

> 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?

If we can see the exact code you tried, perhaps.

-- 
 \                              “Holy hole in a donut, Batman!” —Robin |
  `\                                                                   |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list