bitly / pyqrencode

python bindings for libqrencode
http://github.com/bitly/pyqrencode
66 stars 17 forks source link

Option usage #3

Open benoit-intrw opened 13 years ago

benoit-intrw commented 13 years ago

The option enum from qrencode.h are not available at python level. (QR_ECLEVEL_L, etc., QR_MODE_NUM, etc.)

How are we supposed to pass option to encode method ?

I've tried following code which result in segmentation fault.

enc.encode('http://bit.ly', {'mode': 1, 'ec_level': 1})

Any tips ?

jehiah commented 13 years ago

that appears to be the best way to pass them in currently, but those should be exposed to python.

Can you give a backtrace for where you get a segfault? also, what eversion python are you using?

benoit-intrw commented 13 years ago

Thank you for the quick response.

There is no backtrace, just a laconic "Erreur de segmentation" (My locale are in french)

I re-build the env to be sure, so:

Running test_qr.py works. Then, I change the code as describe in my first message and get the segfault.