How to call a Python Class?

Chris Angelico rosuav at gmail.com
Tue May 3 19:14:40 EDT 2016


On Wed, May 4, 2016 at 8:56 AM, David Shi via Python-list
<python-list at python.org> wrote:
> 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.

Did you get a .py file, or only a .pyc? Try deleting all .pyc files
that you downloaded, and try again.

ChrisA



More information about the Python-list mailing list