Changeset 670:87c6ede3b10b


Ignore:
Timestamp:
09/08/13 15:53:46 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Message:

Beware py2exe's rabbitholes, for they are windy and full of teeth (no-pyflakes for good measure)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/resources.py

    r173 r670  
    22import sys
    33
    4 from pkg_resources import resource_filename
     4try:
     5    from pkg_resources import resource_filename
     6except ImportError:
     7    # OK, we're most likely running under py2exe, so this is safe
     8    # (for values of safe that are unconcerned about py2exe being involved)
     9    def resource_filename(mod, path):
     10        # There are better ways of doing this, but I've spent too much
     11        # time going down this rabbithole already
     12        return os.path.join(os.path.dirname(__file__), '..', 'data', path)
    513import pygame
    614
Note: See TracChangeset for help on using the changeset viewer.