Pergunta

am using a python scripts in c/c++ program and i want to import python packages from a zip file as in Sublime Text, is there a better way to do it?

Foi útil?

Solução

Use zipimport.

>>> import sys
>>> sys.path.insert(0, 'example.zip')  # Add .zip file to front of path
>>> import foobar
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top