platform module problem when frozen?

Dave Angel davea at ieee.org
Wed Dec 16 10:07:52 EST 2009



Gabriel Rossetti wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Hello 
> everyone,
>
> I am having problems with the platform module when being run from a 
> frozen program (py2exe). It imports it fine, but it gives me the 
> following error :
>
> 'module' object does not contain attribute 'platform' when I do this :
>
> platform.platfom()
>
> Does platform have a problem with being called when in a frozen 
> program or does it do some stuff behind the scenes that py2exe doesn't 
> pickup?
>
> Thank you,
> Gabriel
>
> </div>
>
Chances are that there is another module "platform" which is being 
picked up instead of the one in the library.  Have you tried printing  
platform.__file__  ??

If it's getting the wrong one, you probably have a search-order problem.

DaveA




More information about the Python-list mailing list