I used the following code

path = os.getcwd()
sys.path.append(path + '/Lib')
path2 = os.walk(path + '/Lib')
for dirpath, dirnames, filenames in path2:
sys.path.append(path + dirpath)

To add everything in the lib folder to the sys path. Everything works perfectly, until we compile it, and then it doesn't work. :(

On Mon, Aug 8, 2011 at 5:57 AM, Mark Hammond <skippy.hammond@gmail.com> wrote:
On 8/08/2011 4:55 PM, Adam Estes wrote:
We are working on developing a python application that allows us to
update our modules by automatically downloading them from a website.

We have a preloader system that identifies the files that need to be
updated via MD5 and downloads it, and then imports the main program and
runs it. The main program works perfectly before compile. After
compiling it though, it immediately errors out at importing

GeneralFunctions is confirmed to be in the Lib directory as it should
be, but the program does not want to see it at all.

Here is a copy of the setup.py file


Basically, once py2exe is used, Python does not see/use the Lib folder

What should I be doing?

You might find that simply adding stuff to sys.path before you do the imports will work.