Hello,
I have a Python application (Python 2,4) that makes extensive use of pytz, but am having problems getting py2exe to build the application properly.  My application fails at:
 
  File "pytz\__init__.pyc", line 71, in timezone
    None
  KeyError: 'Europe/London'
 
It seems to be because the subdirectories of pytz (e.g zoneinfo/Europe/London) have not been added into the zip file.  If I manually add the whole pytz folder into the zip file it seems to work fine.
 
I've had a brief look at pytz and what is unusual is that there isn't an explicit dependency on the packages underneath the pytz folder.  They are built dynamically at run time like this (where zone = 'Europe/London' in my case):
 
    zone_bits = ['zoneinfo'] + zone.split('/')
    # Load zone's module
    module_name = '.'.join(zone_bits)
    try:
        module = __import__(module_name, globals(), locals())
    except ImportError:
        raise KeyError, zone  # <--- Here's where my py2exe built app fails
 
Am I expecting too much to expect pytz to handle this?
 
Is there a better workaround than just manually adding pytz to the library.zip file?
 
Thanks in advance!
 
John