Skip to content

Difficulty running bindc_03.py in regular CPython #2485

@rebcabin

Description

@rebcabin

I thought I had the PYTHONPATH figured out, but CType can't be found.

PYTHONPATH=/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/integration_tests/../src/runtime/lpython:/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/integration_tests/.. python bindc_03.py
Traceback (most recent call last):
  File "/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/integration_tests/bindc_03.py", line 12, in <module>
    def g(a: CPtr, value: i32, offset_value: bool) -> None:
  File "/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/src/runtime/lpython/lpython.py", line 477, in wrap
    func = CTypes(func, c_shared_lib, c_shared_lib_path)
  File "/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/src/runtime/lpython/lpython.py", line 369, in __init__
    self.cf = CTypes.emulations[self.name]
AttributeError: type object 'CTypes' has no attribute 'emulations'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions