My current implementation is attempting to take this

and apply it to my situation.

My code looks like this right now (Its pretty horrible, but its just testing purposes)

path = os.getcwd() # Get path
files = os.listdir(path + '/lib') #Everything in the lib folder
filenameToModuleName = lambda f: os.path.splitext(f)[0] #Removed .py
appendLib = lambda f: os.path.join(path + '/lib/', f) #Adds Lib
moduleNames2 = map(filenameToModuleName, files) #Remove the .py
moduleNames = [] #Blank list
for x in moduleNames2: #Filter our module list
if x.startswith('__'): #Skip files
if os.path.isdir(path + '/lib/' +x): #If its a directory, add a /
x = x + '/' 
if x not in moduleNames: #Don't add duplicates to the list
moduleNames.remove('/') #Remove base folder
moduleNames = map(appendLib, moduleNames) #Add Lib
modules = map(__import__, moduleNames)  #Import files

After getting a lot of errors about GeneralFunctions not existing.I added in the / filter and that changed the error to 

Traceback (most recent call last):
  File "", line 46, in <module>
    modules = map(__import__, moduleNames)  #Import files
  File "C:\Python\lib\site-packages\", line 13502, in rpdb2_import_wrapper
    m = g_import(*args, **kwargs)
ImportError: No module named C:\Users\Adam\Documents\Programming Files\trunk\Program Manager/lib/CodexSettings

CodexSettings is a .py file in the /lib/ directory

(This is all before the py2exe compile. Don't even know if it will work after the py2exe compile)

Any suggestions?

On Mon, Aug 8, 2011 at 9:02 AM, Alexey Luchko <> wrote:

You could try to add to C:\\Program Files\\Neocodex\\Manager/Lib/.


BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
Py2exe-users mailing list