On 17 March 2014 08:44, Mark Summerfield <l...@qtrac.plus.com> wrote: > Hi, > > What is the correct idiom for getting the path to a top-level module in 3.3 > and 3.4 when the module might be frozen? > > At the moment I'm using this: > > if getattr(sys, "frozen", False): > path = os.path.dirname(sys.executable) > else: > path = os.path.dirname(__file__)
Why do you want to know this? Does pkgutil.get_data do what you want? http://docs.python.org/3.3/library/pkgutil.html#pkgutil.get_data Oscar -- https://mail.python.org/mailman/listinfo/python-list