Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GObject Introspection support #96

Open
taozuhong opened this issue Mar 11, 2021 · 2 comments
Open

Add GObject Introspection support #96

taozuhong opened this issue Mar 11, 2021 · 2 comments

Comments

@taozuhong
Copy link
Contributor

Add GObject Introspection support to generate .gir file to support multi-program language

https://gi.readthedocs.io/en/latest/index.html

@brechtsanders
Copy link
Owner

I would need some help with that.
Can you write a test scenario for this (e.g. in Python something that writes to a file and the reads it again)?

@taozuhong
Copy link
Contributor Author

Here are two python examples for testing:

import xlsxio
xlsxio_reader = xlsxio.XlsxioReader('file.xlsx')
sheet = xlsxio_reader.get_sheet()
data = sheet.read_data()
sheet.close()
xlsxio_reader.close()

print(data)
import xlsxio
import datetime

types = [str, str, float, int, bool, datetime.datetime]
with xlsxio.XlsxioReader('file.xlsx') as reader:
    with reader.get_sheet('hello', types=types) as sheet:
        header = sheet.read_header()
        only_active = []
        for row in sheet.iter_rows():
            if row[4]:
                only_active.append(row)
print(only_active)

Example project with GObject introspection support:
https://github.com/libical/libical/blob/master/CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants