lundi 13 juin 2016

Where does python search for modules to import? [duplicate]


For the code below, where exactly does python search for the module ? Coming from visual studio, I know that libraries and header files can be specified via project properties or environment variables.

What about python ? If i created a wrapper for a C++ function, where should I place the file in order to import it ? I looked through my environment variables and there is nothing python related and there is no gui for python (not that I know of) so I am confused how import files are being searched.

from sys import argv

script, first, second, third = argv

print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third

Aucun commentaire:

Enregistrer un commentaire