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

How to use it, there are code examples #1

Open
ilsanbao opened this issue Sep 30, 2017 · 1 comment
Open

How to use it, there are code examples #1

ilsanbao opened this issue Sep 30, 2017 · 1 comment

Comments

@ilsanbao
Copy link

How to use it, there are code examples

@i-rinat
Copy link
Owner

i-rinat commented Sep 30, 2017

It's just a snapshot of the code. Far from usable way. At least in the sense I would expect from any library.

At the moment, it's possible to read database, enumerate nodes, and write another copy:

import sys
import mmdb

db = mmdb.read_database(sys.argv[1])

def visitor(node, path):
    pass        

mmdb.walk_tree(db, visitor)

if len(sys.argv) > 2:
    db.write(sys.argv[2])

It's possible to change nodes to some extent. But there is no way to create new nodes or remove them. Also there are no tests at all.

I don't have plans to develop it further, in observable future.

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