Domanda

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?

È stato utile?

Soluzione

Use zipimport.

>>> import sys
>>> sys.path.insert(0, 'example.zip')  # Add .zip file to front of path
>>> import foobar
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top