Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Option usage #3

Open
benoit-intrw opened this issue Oct 31, 2011 · 2 comments
Open

Option usage #3

benoit-intrw opened this issue Oct 31, 2011 · 2 comments

Comments

@benoit-intrw
Copy link

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
Copy link
Member

jehiah commented Oct 31, 2011

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
Copy link
Author

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:

  • Debian squeeze 64bit,
  • python 2.7 in a virtualenv,
  • PIL 1.1.7,
  • libqrencode3 3.1.1

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

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

No branches or pull requests

2 participants