dia r3906 - in trunk: . bindings
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r3906 - in trunk: . bindings
- Date: Sun, 9 Mar 2008 12:05:43 +0000 (GMT)
Author: hans
Date: Sun Mar 9 12:05:42 2008
New Revision: 3906
URL: http://svn.gnome.org/viewvc/dia?rev=3906&view=rev
Log:
2008-03-09 Hans Breuer <hans breuer org>
* bindings/test.py : make it work on windoze again
Modified:
trunk/ChangeLog
trunk/bindings/test.py
Modified: trunk/bindings/test.py
==============================================================================
--- trunk/bindings/test.py (original)
+++ trunk/bindings/test.py Sun Mar 9 12:05:42 2008
@@ -1,11 +1,13 @@
import os, sys
-if os.uname()[0] == "Linux" :
- sys.path.insert (0, os.getcwd() + "/.libs")
- sys.path.insert(0, r'../plug-ins/python')
-else : # sorry only Linux and win32 tested ;)
+if sys.platform == "win32" :
+ print "Adjusting PATH ..."
sys.path.insert(0, r'd:\graph\dia2\python')
+ sys.path.insert(0, r'd:\graph\dia2\bin')
sys.path.insert(0, r'..\plug-ins\python')
+else : # sorry only Linux and win32 tested ;)
+ sys.path.insert (0, os.getcwd() + "/.libs")
+ sys.path.insert(0, r'../plug-ins/python')
import dia
@@ -22,14 +24,17 @@
rd = dia.Renderer
print rd, dir(rd)
-if os.uname()[0] == "Linux" :
- print "FIXME: trouble with dynamic loading on Linux, no plug-ins"
+if sys.platform == "win32" :
+ os.environ["DIA_LIB_PATH"] = r"d:\graph\dia2\dia"
+else :
+ print "FIXME: trouble with dynamic loading on '%s', no plug-ins" % (sys.platform,)
#base_path = os.getcwd() + "/.."
#os.environ["DIA_LIB_PATH"] = base_path + "/objects//:" + base_path + "/plug-ins//"
-else :
- os.environ["DIA_LIB_PATH"] = r"d:\graph\dia2\dia"
-dia.register_plugins()
+try :
+ dia.register_plugins()
+except AttributeError :
+ print "Wrong '%s' picked up?" % (dia.__file__, )
def Export (name, data) :
# write data to file, the format is choosen here
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]