[Bf-python] Re: Can't use Python sets in Blender 2.40

Campbell Barton cbarton at metavr.com
Sat Dec 24 05:37:24 CET 2005


Why not do a...
try:
  dummyset = set() # python 2.4
  del dummyset
except:
  try:
    improt sets
    set  = sets.set
  except:
    raise 'for this script to run a Blender compiled with python 2.4 or 
a full python 2.3 install is required.
 



Tron Thomas wrote:
> I will try installing Python on Windows.  The thing is I think I 
> already have a version on there as I'm using Cygwin.
> Assuming the sets module is missing from the Windows version of Python 
> used by Blender, how difficult would it be to add it?
>
> Stephen Swaney wrote:
>
>> On Fri, Dec 23, 2005 at 07:19:00PM -0800, Tron Thomas wrote:
>>  
>>
>>> Actually I realized I wrote and tested my original exporter on Mac 
>>> OS X so I never knew if sets worked on Windows for version 2.37.
>>> I discovered that the sets Python module still work fine on Blender 
>>> 2.40 for Mac OS X.  I don't know why it doesn't work on Windows.
>>>   
>>
>> Your Mac probably has a complete Python install.  Your Windows box
>> does not.  At least not one Blender can find.  On Windows, since
>> it tends to lack what is commonly installed on 'normal' computers,
>> we provide a bare subset of useful Python modules.  The set module
>> is not one of them (I'm still guessing! ).
>>
>> So you need to
>> 1) install Python 2.4 on your windows box.
>> 2) set the PYTHONPATH env var if necessary.
>>
>>  
>>
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list