Better way to get Python version
Bug #384712 reported by
Juho Vepsäläinen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ARchitecture library |
Fix Released
|
Medium
|
Stani |
Bug Description
This patch makes it possible to extract the version of Python installed in the system making it unnecessary to tweak the installation files should the version used be other than 2.5 (I use 2.6).
To post a comment you must log in.
Hey Juho, thanks a lot! I've changed the print syntax to "print( sys.version) ". As this works already in python2.5
$ bzr diff get_python_ version' python_ version 1970-01-01 00:00:00 +0000 python_ version 2009-06-08 10:42:20 +0000 version[ :3])'`
=== added file 'linux/
--- linux/get_
+++ linux/get_
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo `python -c 'import sys; print(sys.
+
=== modified file 'linux/install' `./get_ python_ version` SCRIPTS= ~/.blender/ scripts
--- linux/install 2009-04-02 02:39:15 +0000
+++ linux/install 2009-06-08 10:39:06 +0000
@@ -1,5 +1,5 @@
#!/bin/bash
-PY_VERSION=2.5
+PY_VERSION=
BLENDER_
sudo apt-get install ipython python-imaging python-cairo python-psyco
cd ..
=== modified file 'linux/ update_ blender_ scripts' blender_ scripts 2009-04-02 02:39:15 +0000 blender_ scripts 2009-06-08 10:39:07 +0000 `./get_ python_ version` SCRIPTS= ~/.blender/ scripts
--- linux/update_
+++ linux/update_
@@ -1,5 +1,5 @@
#!/bin/bash
-PY_VERSION=2.5
+PY_VERSION=
BLENDER_
#install symlinks
cd ../blender/scripts