Difference between revisions of "Lib2geom py2geom"
Johanengelen (talk | contribs) |
Johanengelen (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
== Microsoft Windows == | == Microsoft Windows == | ||
Johan built py2geom for you and packaged them in a 7zip file: [ | Johan built py2geom binaries for you and packaged them in a 7zip file: [http://smi.el.utwente.nl/~johan/py2geom-2023.7z py2geom-2023.7z] (svn rev. 2023) | ||
You have to unpack the 7z file into "Lib\site-packages\" whereever you have python installed. For example: "C:\Python26\Lib\site-packages", so you get "C:\Python26\Lib\site-packages\py2geom\..." with the files in it. | You have to unpack the 7z file into "Lib\site-packages\" whereever you have python installed. For example: "C:\Python26\Lib\site-packages", so you get "C:\Python26\Lib\site-packages\py2geom\..." with the files in it. | ||
You can run test_lib2geom.py to see if python has found py2geom (it should do something, instead of complain of not finding python). | You can run test_lib2geom.py to see if python has found py2geom (it should do something, instead of complain of not finding python). | ||
= Building py2geom = | |||
==Microsoft Windows== | |||
The new version of Boost creates problems for building py2geom on Windows. We are figuring out which way of building will be best in future. |
Latest revision as of 14:04, 1 May 2010
What is py2geom
it is a python lib that provides 2geom functionality. in other words: python bindings to 2geom. it has not been released in binaries yet, so you have to build them yourself from source or read on below...
Some examples
#!/usr/bin/python import py2geom as geom a = geom.Point(1,2) b = geom.Point(31,2) print a, b print "Dot product:", geom.dot(a,b) print "a times 2:", a * 2 print "Equal? (0 = no, 1 = yes):", a == b
Obtaining binaries
Microsoft Windows
Johan built py2geom binaries for you and packaged them in a 7zip file: py2geom-2023.7z (svn rev. 2023)
You have to unpack the 7z file into "Lib\site-packages\" whereever you have python installed. For example: "C:\Python26\Lib\site-packages", so you get "C:\Python26\Lib\site-packages\py2geom\..." with the files in it.
You can run test_lib2geom.py to see if python has found py2geom (it should do something, instead of complain of not finding python).
Building py2geom
Microsoft Windows
The new version of Boost creates problems for building py2geom on Windows. We are figuring out which way of building will be best in future.