Hmm, I can not reproduce this problem, but I think that it is because dict comprehensions seem to not be available in python 2.6. Could you please verify this: open a ordinary python interpreter by typing python in the console and then enter the following code:keithsloan52 wrote:Just tried BOLTS which looks a great idea.
On import BOLTS I get
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/media/Drive D/Shared/FreeCAD/testmacro/BOLTS/__init__.py", line 20, in <module>
from bolttools import blt_parser
File "/media/Drive D/Shared/FreeCAD/testmacro/BOLTS/bolttools/blt_parser.py", line 72
self.standardized = {body:[] for body in self.standard_bodies}
^
SyntaxError: invalid syntax
>>> If I try and run the start_bolts.FCMacro I get similar
Traceback (most recent call last):
File "/media/Drive D/Shared/FreeCAD/testmacro/start_bolts.FCMacro", line 1, in <module>
import BOLTS
File "/media/Drive D/Shared/FreeCAD/testmacro/BOLTS/__init__.py", line 20, in <module>
from bolttools import blt_parser
<type 'exceptions.SyntaxError'>: ('invalid syntax', ('/media/Drive D/Shared/FreeCAD/testmacro/BOLTS/bolttools/blt_parser.py', 72, 34, '\t\tself.standardized = {body:[] for body in self.standard_bodies}\n'))
and I nearly forgot
OS: Ubuntu 10.04.4 LTS
Platform: 32-bit
Version: 0.13.1830 (Git)
Branch: releases/FreeCAD-0-13
Hash: ec7636d7aaf2612e9b43cff5d6a424037d53e505
Python version: 2.6.5
Qt version: 4.6.2
Coin version: 3.1.2
SoQt version: 1.4.2a
OCC version: 6.3.0
Code: Select all
a = {k:[] for k in [1,2,3]}
I will look into this soon and create a development snapshot with this constructs reformulated in a 2.6 compatible way. This problem is tracked in https://github.com/jreinhardt/BOLTS/issues/60, if you have a GitHub account, you can also comment there, if not, it is fine to continue the discussion here. It would be great if you could assist me with getting BOLTS to work with python 2.6. There might be more problems lurking.
With https://duckduckgo.com it is much further down, but I have only started to advertise it a bit, I hope it gets more popular (and findable) with time.berndhahnebach wrote:patience ...jreinhardt wrote:... It has one problem though: an internet search for it will not give you the result you want. But PARTS has the same problem.
If I google for "bolts library" there are allready two results on the first page which takes me to your forum article in OpenScad Forum.
bernd
Greetings
Johannes
Thank you
Johannes
Thank you